#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b;
  cin >> a >> b;
  long long int rem1 = a / 5, rem2 = b / 5;
  long long int arr1[5] = {0}, arr2[5] = {0};
  for (int i = 0; i < 5; i++) {
    arr1[i] = rem1;
    arr2[i] = rem2;
  }
  rem1 = a % 5;
  rem2 = b % 5;
  for (int i = 1; i <= rem1; i++) {
    arr1[i]++;
  }
  for (int i = 1; i <= rem2; i++) {
    arr2[i]++;
  }
  long long int sum = arr1[0] * arr2[0];
  for (int i = 1, j = 4; i < 5; i++, j--) {
    sum += arr1[i] * arr2[j];
  }
  cout << sum;
  return 0;
}
