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