#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int max_sum = n + m;
  unsigned long long res = 0;
  for (int an_sum = 5; an_sum <= max_sum; an_sum += 5) {
    int min_possible_n = max(1, an_sum - m);
    int max_possible_n = an_sum > n ? n : an_sum - 1;
    int n_range = max_possible_n - min_possible_n + 1;
    res += n_range;
  }
  cout << res << endl;
  return 0;
}
