#include <bits/stdc++.h>
const long long int mod = 1e9 + 7;
const int maxn = 2e5 + 50;
using namespace std;
bool isPrime(long long int x) {
  if (x == 1) {
    return 0;
  } else if (x == 2) {
    return 1;
  } else {
    int nb = 0;
    for (int d = 2; d <= sqrt(x); d++) {
      if (x % d == 0) {
        nb++;
      }
    }
    return nb < 1;
  }
}
map<int, int> mymap;
void Factors(long long int x) {
  int p = 2;
  while (x != 1) {
    if (isPrime(p)) {
      while (x % p == 0) {
        mymap[p]++;
        x = x / p;
      }
      p++;
    } else {
      p++;
    }
  }
}
int main() {
  int n, m, x, y;
  cin >> x >> y;
  n = min(x, y);
  m = max(x, y);
  for (int i = 1; i <= n; i++) {
    mymap[i % 5]++;
  }
  long long int res = 0;
  for (int i = 1; i <= m; i++) {
    if (i % 5 == 0) {
      res += mymap[0];
    } else {
      res += mymap[5 - i % 5];
    }
  }
  cout << res;
}
