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