#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long cnt = 0;
  long long n, m;
  cin >> n >> m;
  for (auto i = 1; i <= n; ++i) {
    if (i % 5 == 0) {
      cnt += (m / 5);
      continue;
    }
    long long nxt = ceil(i / 5) * 5;
    long long first = nxt - i;
    long long range = m - first;
    cnt += (range >= 0) ? (range / 5) : 0;
  }
  cout << cnt;
  return 0;
}
