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