#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n, m;
  long long result = 0;
  cin >> n >> m;
  if (n > m) {
    swap(n, m);
  }
  for (long long i = 1; i <= n; i++) {
    if (i + m < 5) continue;
    int r = 5 - (i % 5);
    result++;
    result += (m - r) / 5;
  }
  cout << result << endl;
}
