#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int n, m;
  cin >> n >> m;
  unsigned long long int a[5] = {0}, b[5] = {0};
  for (int i = 1; i <= n; i++) {
    a[i % 5]++;
  }
  for (int i = 1; i <= m; i++) {
    b[i % 5]++;
  }
  unsigned long long int sum = a[0] * b[0];
  for (int i = 1; i < 5; i++) {
    sum += a[i] * b[5 - i];
  }
  cout << sum;
}
