#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, total = 0;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) total = total + (i + m) / 5 - i / 5;
  cout << total << '\n';
  return 0;
}
