#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  unsigned long long res = 0;
  for (int i = 1; i <= n; i++) {
    res += m / 5;
    int a = m;
    while (a % 5 != 0) {
      if ((a + i) % 5 == 0) {
        res++;
      }
      a--;
    }
  }
  cout << res << endl;
  return 0;
}
