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