#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  cin >> n >> m;
  vector<long long> a(5);
  vector<long long> b(5);
  long long sum = 0;
  for (long long i = 0; i < 5; i++) {
    a[i] = n / 5;
    if (n % 5 >= i && i != 0) a[i]++;
    b[i] = (m + i) / 5;
    sum += (a[i] * b[i]);
  }
  cout << sum << "\n";
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
