#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, co[2][5] = {}, te, ans1;
  cin >> n >> m;
  te = n / 5;
  for (int i = 0; i < 5; i++) co[0][i] = te;
  for (int i = 1; i <= n % 5; i++) co[0][i]++;
  te = m / 5;
  for (int i = 0; i < 5; i++) co[1][i] = te;
  for (int i = 1; i <= m % 5; i++) co[1][i]++;
  ans1 = co[0][0] * co[1][0];
  for (int i = 1; i < 5; i++) ans1 += co[0][i] * co[1][5 - i];
  cout << ans1 << endl;
  return 0;
}
