#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  map<long long int, long long int> make_pair;
  for (long long int i = 1; i <= m; i++) make_pair[i % 5]++;
  long long int ans = 0;
  for (long long int i = 1; i <= n; i++) {
    long long int x = i % 5;
    long long int req = 5 - x;
    if (req == 5) req = 0;
    ans += make_pair[req];
  }
  cout << ans;
}
