#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long k = 0;
  long long temp;
  if (m < n) {
    temp = m;
    m = n;
    n = temp;
  }
  for (long long i = 1; i <= n; i++) {
    k = k + ((m + (i % 5)) / 5);
  }
  cout << k << endl;
}
