#include <bits/stdc++.h>
const int mod = (int)1e9 + 7;
using namespace std;
int n, m;
long long ans;
int main() {
  cin >> n >> m;
  if (min(n, m) < 4) {
    for (int i = 1; i <= int(n); i++)
      for (int j = 1; j <= int(m); j++)
        if ((i + j) % 5 == 0) ans++;
    cout << ans;
    return 0;
  }
  for (int i = 1; i <= int(n); i++) {
    int mn = 5 - i % 5, mx = m;
    while (mx % 5 != mn % 5) mx--;
    ans += (mx - mn) / 5 + 1;
  }
  cout << ans;
}
