#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin >> n;
  long m;
  cin >> m;
  long long tab[] = {0, 0, 0, 0, 0};
  long long tab2[] = {0, 0, 0, 0, 0};
  for (long i = 1; i <= n; i++) {
    tab[i % 5]++;
  }
  for (long j = 1; j <= m; j++) {
    tab2[j % 5]++;
  }
  cout << tab2[0] * tab[0] + tab2[2] * tab[3] + tab2[1] * tab[4] +
              tab2[3] * tab[2] + tab2[4] * tab[1];
  return 0;
}
