#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n, m;
  while (cin >> n >> m) {
    unsigned long long count = 0;
    for (int i = 1; i <= n; i++) count += (m + i) / 5 - (i / 5);
    cout << count << endl;
  }
  return 0;
}
