#include <bits/stdc++.h>
using namespace std;
template <typename T>
void show(vector<T> a, int p = 0) {
  for (int i = 0; i < a.size(); i++) {
    if (p == 0) cout << a[i] << endl;
    if (p == 1 || p == 2) cout << a[i] << ' ';
  }
  if (p == 2) cout << endl;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<long long> v1(10);
  vector<long long> v2(10);
  for (int i = 1; i <= n; i++) {
    v1[i % 10]++;
  }
  for (int i = 1; i <= m; i++) {
    v2[i % 10]++;
  }
  long long res = v1[0] * (v2[0] + v2[5]) + v1[1] * (v2[9] + v2[4]) +
                  v1[2] * (v2[8] + v2[3]) + v1[3] * (v2[7] + v2[2]) +
                  v1[4] * (v2[6] + v2[1]) + v1[5] * (v2[5] + v2[0]) +
                  v1[6] * (v2[4] + v2[9]) + v1[7] * (v2[3] + v2[8]) +
                  v1[8] * (v2[2] + v2[7]) + v1[9] * (v2[1] + v2[6]);
  cout << res;
  return 0;
}
