#include <bits/stdc++.h>
using namespace std;
long long int power(long long int first, long long int n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0) {
    long long int second = power(first, n / 2);
    return second * second;
  } else
    return first * power(first, n - 1);
}
int strTOint(string s) {
  stringstream ss;
  int first;
  ss << s;
  ss >> first;
  return first;
}
double geo_dist(int a, int b, int c, int d) {
  double dd = (double)(a - c) * (a - c) + (b - d) * (b - d);
  double r = sqrt(dd) + 1e-9;
  return r;
}
long long int bigmod(long long int a, long long int p, long long int m) {
  if (p == 0) return 1 % m;
  if (p % 2 == 0) {
    long long int second = bigmod(a, p / 2, m);
    return (second * second) % m;
  } else {
    return (a * bigmod(a, p - 1, m)) % m;
  }
}
long long int first, second, d, g;
void ext_gcd(long long int a, long long int b) {
  if (b == 0) {
    first = 1;
    second = 0;
    d = a;
    return;
  }
  ext_gcd(b, a % b);
  long long int x1 = second;
  long long int y1 = first - (a / b) * second;
  first = x1;
  second = y1;
}
long long int modInv(long long int a, long long int m) {
  ext_gcd(a, m);
  first %= m;
  if (first < 0) first += m;
  return first;
}
int fx[] = {0, 0, -1, 1, -1, 1, 1, -1};
int fy[] = {1, -1, 0, 0, 1, 1, -1, -1};
map<string, int> mp;
vector<pair<int, int> > adj[1000];
vector<int> v;
int main() {
  long long int n, m;
  cin >> n >> m;
  long long int a, b, c, d, e, a1, b1, c1, d1, e1;
  long long int sum = 0;
  int j = 0;
  a = n / 5;
  a1 = m / 5;
  a *= a1;
  sum += a;
  for (int i = 1; i <= 4; i++) {
    j = 5 - i;
    j %= 5;
    a = n / 5;
    if (n % 5 >= i) a++;
    a1 = m / 5;
    if (m % 5 >= j) a1++;
    a *= a1;
    sum += a;
  }
  cout << sum << endl;
  return 0;
}
