#include <bits/stdc++.h>
const int MAX = 1e6;
using namespace std;
const int alpha = 26;
void solve() {
  long long int n, m;
  cin >> n >> m;
  long long int count = 0;
  for (int i = 1; i <= n; i++) {
    count += (i + m) / 5;
    count -= i / 5;
  }
  cout << count;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
}
