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