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