#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m;
  cin >> n >> m;
  long long int ans = 0;
  long long int md[5] = {0};
  for (long long int i = 1; i <= m; ++i) md[i % 5]++;
  for (long long int i = 1; i <= n; ++i) ans += md[(5 - (i % 5)) % 5];
  cout << ans;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
