#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793;
const int eps = 1e-10;
const int base = 1e9;
const int N = 100005;
int main() {
  int n, m;
  long long ans = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    ans += (i + m) / 5 - i / 5;
  }
  cout << ans << endl;
  return 0;
}
