#include <bits/stdc++.h>
using namespace std;
class Task {
 public:
  void solve(istream& in, ostream& out) {
    long long n, m;
    cin >> n >> m;
    long long a[2], b[2];
    a[0] = n / 5;
    a[1] = n % 5;
    b[0] = m / 5;
    b[1] = m % 5;
    long long res = 0;
    res += a[0] * b[0] * 5 + b[1] * a[0];
    long long c[a[1]];
    for (long long i = 0; i < a[1]; i++) {
      c[i] = i + 1 + 5 * a[0];
    }
    long long d[m];
    for (long long i = 0; i < m; i++) {
      d[i] = i + 1;
    }
    for (long long i = 0; i < a[1]; i++) {
      for (long long j = 0; j < m; j++) {
        if ((c[i] + d[j]) % 5 == 0) {
          res++;
        }
      }
    }
    cout << res << endl;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  istream& in(cin);
  ostream& out(cout);
  Task solver;
  solver.solve(in, out);
  return 0;
}
