#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[10], b[10];
  long long n, m;
  int nn, mm;
  scanf("%lld%lld", &n, &m);
  nn = n % 5;
  mm = m % 5;
  for (int i = 0; i < 5; i++) {
    a[i] = n / 5;
    b[i] = m / 5;
    if (i != 0 && i <= nn) a[i]++;
    if (i != 0 && i <= mm) b[i]++;
  }
  printf("%lld\n",
         a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
  return 0;
}
