#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, ans = 0;
  cin >> n >> m;
  if (n > m) swap(n, m);
  for (int i = 1; i <= n; i++) {
    int mod = i % 5;
    if (mod == 0)
      ans += m / 5;
    else if (m / 5 * 5 + (5 - mod) <= m)
      ans += (m / 5 * 5 + 5) / 5;
    else
      ans += (m / 5 * 5 + 5) / 5 - 1;
  }
  cout << ans;
  return 0;
}
