#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  long long n, m;
  long long ans = 0, c = 0, x = 0;
  cin >> n >> m;
  long long mm = m;
  for (int i = 1; i <= n; i++) {
    mm = m;
    x = 5 - (i % 5);
    mm -= x;
    if (mm >= 0) ans++;
    ans += mm / 5;
  }
  cout << ans;
  return 0;
}
