#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long count1 = 0, count2 = 0, count3 = 0, count4 = 0, count5 = 0;
  long long Bcount1 = 0, Bcount2 = 0, Bcount3 = 0, Bcount4 = 0, Bcount5 = 0;
  for (long long i = (long long)1; i <= (long long)n; i++) {
    if (i % 5 == 1)
      count1++;
    else if (i % 5 == 2)
      count2++;
    else if (i % 5 == 3)
      count3++;
    else if (i % 5 == 4)
      count4++;
    else if (i % 5 == 0)
      count5++;
  }
  for (long long i = (long long)1; i <= (long long)m; i++) {
    if (i % 5 == 1)
      Bcount1++;
    else if (i % 5 == 2)
      Bcount2++;
    else if (i % 5 == 3)
      Bcount3++;
    else if (i % 5 == 4)
      Bcount4++;
    else if (i % 5 == 0)
      Bcount5++;
  }
  cout << (count1 * Bcount4) + (count2 * Bcount3) + (count3 * Bcount2) +
              (count4 * Bcount1) + (count5 * Bcount5)
       << "\n";
  return 0;
}
