#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  long long int res1 = n % 5;
  long long int ful1 = n / 5;
  long long int res2 = m % 5;
  long long int ful2 = m / 5;
  long long int result = 5 * ful1 * ful2;
  result += res1 * ful2;
  result += res2 * ful1;
  if ((res1 > 0) && (res2 > 0)) {
    for (int i = 1; i <= res1; i++) {
      if (5 - i <= res2) {
        result++;
      }
    }
  }
  cout << result;
  return 0;
}
