#include <bits/stdc++.h>
int gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
using namespace std;
int main() {
  long long a, b, arr[5] = {0}, sum = 0;
  cin >> a >> b;
  for (int i = 1; i <= 5; i++) {
    int j = i - 1, mod = 5 - i;
    while (mod <= b) {
      arr[j]++;
      mod = mod + 5;
    }
    sum = sum + arr[j];
  }
  sum--;
  arr[4]--;
  if (a <= 5) {
    sum = 0;
    for (int i = 1; i <= a; i++) sum = sum + arr[i - 1];
  } else {
    sum = sum * (a / 5);
    for (int i = 1; i <= a % 5; i++) sum = sum + arr[i - 1];
  }
  cout << sum << endl;
  return 0;
}
