#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, j, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0,
                            h = 0, x = 0, y = 0;
  long long int sum;
  cin >> n;
  cin >> m;
  int arr1[n];
  int arr2[m];
  for (i = 0; i < n; i++) arr1[i] = (i + 1) % 5;
  for (j = 0; j < m; j++) arr2[j] = (j + 1) % 5;
  for (i = 0; i < n; i++) {
    if (arr1[i] == 0) a = a + 1;
    if (arr1[i] == 1) b = b + 1;
    if (arr1[i] == 2) c = c + 1;
    if (arr1[i] == 3) d = d + 1;
    if (arr1[i] == 4) e = e + 1;
  }
  for (j = 0; j < m; j++) {
    if (arr2[j] == 0) f = f + 1;
    if (arr2[j] == 1) g = g + 1;
    if (arr2[j] == 2) h = h + 1;
    if (arr2[j] == 3) x = x + 1;
    if (arr2[j] == 4) y = y + 1;
  }
  sum = (b * y) + (c * x) + (d * h) + (e * g) + (a * f);
  cout << sum << endl;
}
