#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
vector<int> isPrime(1e6, 1);
void seive(int range) {
  isPrime[0] = isPrime[1] = 0;
  for (int i = 2; i * i <= range; i++)
    if (isPrime[i])
      for (int j = i * i; j <= range; j += i) isPrime[j] = 0;
}
long long mod_expo(long long n, long long exp, long long p = MOD) {
  long long res = 1;
  while (exp > 0) {
    if (exp & 1) {
      res = ((res % p) * (n % p)) % p;
      exp--;
    };
    n = ((n % p) * (n % p)) % p;
    exp >>= 1;
  }
  return res;
}
bool checkPrime(int n) {
  if (n == 1 or n == 0) return false;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
void solve() {
  long long a, b;
  cin >> a >> b;
  vector<long long> v1(5), v2(5);
  for (int i = 0; i < 5; i++) {
    v1[i] = a / 5;
    if (a % 5 >= i) v1[i]++;
    v2[i] = b / 5;
    if (b % 5 >= i) v2[i]++;
  }
  v1[0]--, v2[0]--;
  long long ans = 0;
  ans = v1[0] * v2[0] + v1[1] * v2[4] + v1[2] * v2[3] + v1[3] * v2[2] +
        v1[4] * v2[1];
  cout << (ans) << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  std::chrono::time_point<std::chrono::system_clock> start, end;
  start = std::chrono::system_clock::now();
  solve();
  end = std::chrono::system_clock::now();
  std::chrono::duration<double> elapsed_seconds = end - start;
  std::time_t end_time = std::chrono::system_clock::to_time_t(end);
  return 0;
}
