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