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