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