#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, cou, res, nw, nw2;
  while (scanf("%I64d%I64d", &n, &m) == 2) {
    cou = 0;
    res = n + m;
    nw = 5;
    while (1) {
      if (nw > res) break;
      if (n >= nw - 1 && m >= nw - 1)
        cou += (nw - 1);
      else if ((n >= nw - 1 && m < nw - 1) || (n < nw - 1 && m >= nw - 1)) {
        cou += min(n, m);
      } else {
        nw2 = nw - max(n, m);
        cou += (min(n, m) - nw2) + 1;
      }
      nw += 5;
    }
    printf("%I64d\n", cou);
  }
  return 0;
}
