#include <bits/stdc++.h>
using namespace std;
int n, m;
long long cnt;
int main() {
  scanf("%d%d", &n, &m);
  int mn = min(n, m);
  int mx = max(n, m);
  for (int i = 1; i <= mn; i++) {
    int res = res = i % 5;
    res = 5 - res;
    if (res <= mx) cnt++;
    int y = mx - res;
    if (y) cnt += 1LL * (y / 5);
  }
  printf("%I64d\n", cnt);
  return 0;
}
