#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  long long ma[5] = {0}, mb[5] = {0};
  scanf("%d", &n), scanf("%d", &m);
  for (int i = 1; i <= n; i++) {
    ma[i % 5]++;
  }
  for (int i = 1; i <= m; i++) {
    mb[i % 5]++;
  }
  long long ans = ma[0] * mb[0];
  for (int i = 1; i <= 4; i++) {
    ans += ma[i] * mb[5 - i];
  }
  cout << ans << endl;
  return 0;
}
