#include <bits/stdc++.h>
using namespace std;
using namespace std;
const unsigned int M = 1000000007;
int power(long long x, long long p, long long m) {
  if (p == 0) {
    return 1;
  }
  long long res = power(x, p / 2, m);
  if (p % 2 != 0) {
    return (res % m * res % m * x % m) % m;
  } else {
    return (res % m * res % m) % m;
  }
}
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return (b, a % b);
}
int fib(int x) {
  if (x <= 1) {
    return x;
  }
  return fib(x - 1) + fib(x - 2);
}
bool isprime(int x) {
  for (int i = 2; i < x; ++i) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
int GCD(int a, int b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
int issorted(vector<int> vec) {
  for (int i = 0; i < vec.size(); ++i) {
    if (vec[i] != i + 1) {
      return 0;
    }
  }
  return 1;
}
bool isPerfectSquare(long long x) {
  long long s = sqrt(x);
  return (s * s == x);
}
bool isFibonacci(long long n) {
  return isPerfectSquare(5 * n * n + 4) || isPerfectSquare(5 * n * n - 4);
}
bool check(int a) {
  int k = 0;
  while (a != 0) {
    a /= 10;
    ++k;
  }
  if (k % 2 == 0) {
    return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    long long m, n;
    cin >> m >> n;
    long long arra[5]{0};
    long long arrb[5]{0};
    for (long long i = 1; i <= m; ++i) {
      arra[i % 5]++;
    }
    for (long long i = 1; i <= n; ++i) {
      arrb[i % 5]++;
    }
    long long sum = arra[0] * arrb[0] + arra[1] * arrb[4] + arra[2] * arrb[3] +
                    arra[3] * arrb[2] + arra[4] * arrb[1];
    cout << sum << endl;
  }
}
