#include <bits/stdc++.h>
int main() {
  int n, i, j, k, m;
  long long int s = 0;
  scanf("%d %d", &n, &m);
  for (i = 1; i <= n; i++) {
    s = s + ((m + i) / 5 - i / 5);
  }
  printf("%lld", s);
  return 0;
}
