#include <bits/stdc++.h>
using namespace std;
int n, m;
long long ans, mn, mx;
int main() {
  cin >> n >> m;
  mn = min(n, m);
  mx = max(n, m);
  ans = mn * (mx / 5);
  while (mx % 5 != 0) {
    for (int i = 1; i <= min(5ll, mn); ++i) {
      if ((mx + i) % 5 == 0) {
        for (int j = i; j <= mn; j += 5) ans++;
        break;
      }
    }
    mx--;
  }
  cout << ans << endl;
  return 0;
}
