#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  while (scanf("%d %d", &n, &m) == 2) {
    long long ans = 0;
    for (int i = 1; i <= n; ++i) {
      int l = 1, r = m;
      while ((i + l) % 5) ++l;
      while ((i + r) % 5) --r;
      ans += (r - l) / 5 + 1;
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
