#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long> n1(5, 0);
  vector<long long> m1(5, 0);
  int n, m;
  cin >> n >> m;
  int q = n / 5;
  int c = n % 5;
  for (int i = 0; i < 5; i++) n1[i] = q;
  for (int i = 1; i <= c; i++) n1[i]++;
  q = m / 5;
  c = m % 5;
  for (int i = 0; i < 5; i++) m1[i] = q;
  for (int i = 1; i <= c; i++) m1[i]++;
  long long ans = 0;
  for (int i = 0; i < 5; i++)
    for (int j = 0; j < 5; j++) {
      if ((i + j) % 5 == 0) ans += n1[i] * m1[j];
    }
  m1.clear();
  n1.clear();
  cout << ans << endl;
}
