#include <bits/stdc++.h>
using namespace std;
long long g(long long n, long long m) {
  long long ans = 0;
  for (long long x = 1; x <= n; x++) {
    long long minY = 5 - (x % 5);
    if (minY <= m) ans += (m - minY) / 5 + 1;
  }
  return ans;
}
long long gs(long long n, long long m) {
  long long ans = 0;
  for (long long x = 1; x <= n; x++) {
    for (long long y = 1; y <= m; y++) {
      if ((x + y) % 5 == 0) ans++;
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long n, m;
  cin >> n >> m;
  cout << g(n, m) << endl;
  return 0;
}
