#include <bits/stdc++.h>
const double eps = 1e-7;
using namespace std;
int n, m;
int main() {
  while (~scanf("%d%d", &n, &m)) {
    long long ans = 0;
    for (int i = 1; i <= n; i++) {
      int t1 = 5 - (i % 5);
      if (m >= t1) ans += (m - t1) / 5 + 1;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
