#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long m, n;
  cin >> m >> n;
  long long maior = max(m, n);
  long long menor = min(m, n);
  long long vec[10];
  long long ans = 0;
  for (long long i = 1; i <= 5; ++i) {
    long long tmp = maior;
    while ((tmp + i) % 5 != 0) {
      tmp--;
      if (tmp == 0) break;
    }
    vec[i] = (tmp + i) / 5;
    if (i == 5) vec[i]--;
    ans += vec[i] * (menor / 5);
  }
  for (long long i = 1; i <= menor % 5; ++i) {
    ans += vec[i];
  }
  printf("%lld\n", ans);
  return 0;
}
