#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 100 * 10 * 3 + 10;
long long a[10], b[10];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i < n + 1; i++) a[i % 5]++;
  for (int j = 1; j < m + 1; j++) b[j % 5]++;
  cout << (a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
  return 0;
}
