#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, m, l = 0, h, c, curr = 0;
  int n, arr[100004] = {0}, brr[100004] = {0};
  cin >> n >> m;
  long long int x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0;
  long long int y1 = 0, y2 = 0, y3 = 0, y4 = 0, y5 = 0;
  x1 = x2 = x3 = x4 = x5 = n / 5;
  y1 = y2 = y3 = y4 = y5 = m / 5;
  n = n % 5;
  m = m % 5;
  if (n == 4) {
    x1++;
    x2++;
    x3++;
    x4++;
  }
  if (n == 3) {
    x1++;
    x2++;
    x3++;
  }
  if (n == 2) {
    x1++;
    x2++;
  }
  if (n == 1) {
    x1++;
  }
  if (m == 4) {
    y1++;
    y2++;
    y3++;
    y4++;
  }
  if (m == 3) {
    y1++;
    y2++;
    y3++;
  }
  if (m == 2) {
    y1++;
    y2++;
  }
  if (m == 1) {
    y1++;
  }
  long long int ans = (x1 * y4 + x2 * y3 + x3 * y2 + x4 * y1 + x5 * y5);
  cout << ans;
  return 0;
}
