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