#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, count = 0, flag, temp;
  cin >> n >> m;
  long long int count1 = m + n - (m + n) % 5;
  long long int min1 = min(n, m), max1 = max(n, m);
  for (long int i = 1; i <= min1; i++) {
    flag = i / 5;
    temp = (i + max1) / 5;
    count += temp - flag;
  }
  cout << count;
  return 0;
}
