#include <bits/stdc++.h>
using namespace std;
long long a[5], b[5];
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, c = 0;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) a[i % 5]++;
  for (long long i = 1; i <= m; i++) b[i % 5]++;
  cout << (a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
  return 0;
}
