#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, small, large, arr[5], k = 0, sum = 0;
  cin >> n >> m;
  if (n > m) {
    small = m;
    large = n;
  } else {
    small = n;
    large = m;
  }
  for (long i = 4; i >= 0; i--) {
    if ((large - i) >= 0) {
      arr[k] = (large - i) / 5 + 1;
    } else
      arr[k] = 0;
    sum += arr[k++];
  }
  sum--;
  long long result, count;
  result = (small / 5) * (sum);
  count = small % 5;
  for (long i = 0; i < count; i++) result += arr[i];
  cout << result;
  return 0;
}
