#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  int a[6];
  scanf("%d%d", &n, &m);
  {
    double sum = 0;
    memset(a, 0, sizeof(a));
    int cc, res;
    res = min(5, n);
    for (int i = 1; i <= res; i++) {
      a[i] = (i + m) / 5;
      if (i == 5) a[i]--;
      sum += a[i];
    }
    sum = (sum * (n / 5));
    for (int i = 1; i <= n % 5; i++) {
      sum += a[i];
    }
    printf("%.0lf\n", sum);
  }
  return 0;
}
