#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  long long arr[5];
  long long arr2[5];
  memset(arr, 0, sizeof(arr));
  memset(arr2, 0, sizeof(arr2));
  for (int i = 1; i <= n; i++) {
    int num = i % 5;
    arr[num]++;
  }
  for (int i = 1; i <= m; i++) {
    int num = i % 5;
    arr2[num]++;
  }
  long long ans = 0;
  ans += arr[1] * arr2[4];
  ans += arr[4] * arr2[1];
  ans += arr[2] * arr2[3];
  ans += arr[3] * arr2[2];
  ans += arr[0] * arr2[0];
  printf("%lld\n", ans);
  return 0;
}
