#include <bits/stdc++.h>
using namespace std;
long long ara1[5], ara2[5];
int main() {
  long long n, m;
  cin >> n >> m;
  long long c = n / 5, d = m / 5;
  for (int i = 0; i < 5; i++) {
    ara1[i] = c;
    ara2[i] = d;
  }
  n %= 5, m %= 5;
  for (int i = 1; i <= n; i++) ara1[i]++;
  for (int i = 1; i <= m; i++) ara2[i]++;
  long long ans = 0;
  for (int i = 0; i < 5; i++) {
    int k = (5 - i) % 5;
    ans += ara1[i] * ara2[k];
  }
  cout << ans;
}
