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