#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  long long c = 0;
  int r[5];
  memset(r, 0, sizeof(r));
  for (int i = 1; i <= m; i++) r[i % 5]++;
  for (int i = 1; i <= n; i++) c += (1LL) * (r[(5 - (i % 5)) % 5]);
  cout << c;
  return 0;
}
