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