#include <bits/stdc++.h>
using namespace std;
long long cant = 0, n, m, y, x, x2;
int main() {
  scanf("%I64d%I64d", &n, &m);
  if (n % 5 == 0) {
    printf("%I64d", ((n / 5) * m));
    return 0;
  } else if (m % 5 == 0) {
    printf("%I64d", (m / 5) * n);
    return 0;
  } else {
    x2 = n;
    while (x2 % 5 != 0) x2--;
    cant = (n / 5) * m;
    for (int i = x2 + 1; i <= n; i++) {
      x = i;
      while (x % 5 != 0 or x <= i) x++;
      for (long long j = x; j <= 2000000; j += 5) {
        y = j - i;
        if (y <= m) {
          cant++;
        } else
          break;
      }
    }
  }
  printf("%I64d", cant);
  return 0;
}
