#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e5 + 10;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
  int n, m;
  cin >> n >> m;
  int c[5] = {}, d[5] = {};
  for (int i = 1; i <= n; ++i) c[i % 5]++;
  for (int i = 1; i <= m; ++i) d[i % 5]++;
  long long ans = 0;
  for (int i = 0; i < 5; ++i) {
    ans += 1LL * c[i] * d[(5 - i) % 5];
  }
  cout << ans << endl;
  return 0;
}
