#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int T = 1;
  for (int test_case = 1; test_case <= T; ++test_case) {
    int n, m;
    cin >> n >> m;
    int count = 0;
    int64_t res = 0;
    for (int i = 1; i <= n; ++i) {
      count += (i % 5 == 0);
      res += ((m + i) / 5) - count;
    }
    cout << res << '\n';
  }
}
