#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  long long arr1[] = {0, 0, 0, 0, 0};
  long long arr2[] = {0, 0, 0, 0, 0};
  for (long long i = 1; i <= n; i++) {
    arr1[(i % 5)] += 1;
  }
  for (long long i = 1; i <= m; i++) {
    arr2[(i % 5)] += 1;
  }
  long long ans = 0;
  ans += arr1[0] * arr2[0];
  ans += arr1[1] * arr2[4];
  ans += arr1[2] * arr2[3];
  ans += arr1[3] * arr2[2];
  ans += arr1[4] * arr2[1];
  cout << ans << endl;
}
