#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  scanf("%lld%lld", &n, &m);
  long long npair = n / 5;
  long long mpair = m / 5;
  long long nextra = n % 5;
  long long mext = m % 5;
  long long solve = npair * mpair * 5 + nextra * mpair + mext * npair;
  if (nextra + mext > 4) solve += (nextra + mext) - 4;
  printf("%lld\n", solve);
  return 0;
}
