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