#include <bits/stdc++.h>
using namespace std;
template <typename P, typename Q>
ostream& operator<<(ostream& os, pair<P, Q> p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
int main(int argc, char* argv[]) {
  long long int n, m;
  while (scanf("%lld%lld", &n, &m) == 2) {
    long long int sum = 0;
    for (int i = 1; i <= n; ++i) {
      long long int a = i + 1;
      long long int b = i + m;
      sum += b / 5 - max<long long int>(0, a - 1) / 5;
    }
    printf("%lld\n", sum);
  }
  return 0;
}
