#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long count[2][5];
  long long a = n / 5;
  long long b = n % 5;
  for (long long i = 0; i < 5; i++) count[0][i] = a;
  for (long long i = 0; i < b; i++) count[0][i]++;
  a = m / 5;
  b = m % 5;
  for (long long i = 0; i < 5; i++) count[1][i] = a;
  for (long long i = 0; i < b; i++) count[1][i]++;
  cout << (count[0][0] * count[1][3] + count[0][1] * count[1][2] +
           count[0][2] * count[1][1] + count[0][3] * count[1][0] +
           count[0][4] * count[1][4])
       << endl;
  return 0;
}
