#include <bits/stdc++.h>
using namespace std;
int main() {
  map<int, bool> vis;
  int a, b, m, n;
  long long res = 0;
  cin >> a >> b;
  m = min(a, b);
  n = max(a, b);
  for (int i = 1; i <= m; i++) {
    res += ((n + i) / 5) - (i / 5);
  }
  cout << res;
  return 0;
}
