#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const long long MOD = (long long)(1e9) + (long long)(7);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, m;
  cin >> n >> m;
  long long arr1[5]{0}, arr2[5]{0};
  for (int i = 1; i <= n; i++) arr1[i % 5]++;
  for (int i = 1; i <= m; i++) arr2[i % 5]++;
  long long ans = 0;
  for (int a = 0; a < 5; a++) {
    for (int b = 0; b < 5; b++) {
      if ((a + b) % 5 != 0) continue;
      ans += arr1[a] * arr2[b];
    }
  }
  cout << ans;
}
