#include <bits/stdc++.h>
using namespace std;
int X[6];
int N, M;
int main(void) {
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= N; i++) X[((i - 1) % 5) + 1]++;
  long long ans = 0;
  for (int i = 1; i <= 5; i++) {
    int Y = 0;
    for (int y = 1; y <= M; y++)
      if ((i + y) % 5 == 0) Y++;
    ans += (long long)(X[i]) * (long long)Y;
  }
  printf("%I64d\n", ans);
  return 0;
}
