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