#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, y;
  cin >> x >> y;
  long long int ans = 0;
  for (auto i = 0; i < 5; ++i) {
    ans += ((x / 5 + (i == 0 ? 0 : i <= x % 5)) *
            (y / 5 + (i == 0 ? 0 : 5 - i <= y % 5)));
  }
  cout << ans << endl;
  return 0;
}
