#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  long long m = 1, n = 4, result = 0;
  std::cin >> m >> n;
  long long m_5 = m / 5;
  long long n_5 = n / 5;
  long long mr5 = m % 5;
  long long nr5 = n % 5;
  result = 5 * m_5 * n_5 + mr5 * n_5 + m_5 * nr5 +
           ((nr5 + mr5) > 4 ? nr5 + mr5 - 4 : 0);
  std::cout << result;
  return 0;
}
