#include <bits/stdc++.h>
using namespace std;
int main() {
  int large, i, small;
  long long int ans = 0;
  cin >> large >> small;
  if (small > large) {
    int temp = small;
    small = large;
    large = temp;
  }
  for (i = 1; i <= large; i++) {
    int rem = i % 5;
    int first = 5 - rem;
    int num = (small - first) / 5;
    if (small - first >= 0) num++;
    ans = ans + num;
  }
  cout << ans << endl;
}
