#include <bits/stdc++.h>
using namespace std;
int main() {
  signed long long int n, m;
  cin >> n >> m;
  signed long long int a[n], freq[1000001];
  memset(freq, 0, sizeof(freq));
  for (signed long long int i = 1; i <= n; i++) {
    a[i] = i % 5;
  }
  for (signed long long int i = 1; i <= m; i++) {
    freq[i % 5]++;
  }
  signed long long int ans = 0;
  for (signed long long int i = 1; i <= n; i++) {
    signed long long int cal = 5 - a[i];
    if (a[i] == 0) cal = 0;
    ans += freq[cal];
  }
  cout << ans << endl;
  return 0;
}
