#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long ans;
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
inline void print(long long x) {
  write(x);
  putchar('\n');
}
inline void Swap(long long &a, long long &b) { a ^= b ^= a ^= b; }
inline long long qj(long long x, long long y) {
  if (y < x) return 0;
  return (y - x) / 5 + 1;
}
signed main() {
  n = read();
  m = read();
  if (n > m) Swap(n, m);
  for (register long long i = 1; i <= n; ++i) ans += qj(5 - i % 5, m);
  print(ans);
  return 0;
}
