#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  long long ans = 0;
  for (int x = 1; x <= n; x++) {
    int rem = x % 5;
    int y = (5 - rem) % 5;
    if (m < y) continue;
    int xx = (m - y) / 5 + 1;
    if (!y) xx--;
    ans += xx;
  }
  printf("%lld\n", ans);
}
