#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  if (n > m) swap(n, m);
  long long int temp = 1, ans = 0;
  for (long long int i = 5; temp > 0; i += 5) {
    if (n >= i)
      temp = i - 1;
    else if (m >= i)
      temp = n;
    else if (i > m)
      temp = n - (i - m) + 1;
    if (temp > 0) ans += temp;
  }
  cout << ans << "\n";
  return 0;
}
