#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x[10], y[10], n, m;
  cin >> n >> m;
  x[0] = n / 10;
  y[0] = m / 10;
  for (long long i = 1; i < 10; i++) {
    x[i] = n / 10;
    y[i] = m / 10;
    if (n % 10 >= i) x[i]++;
    if (m % 10 >= i) y[i]++;
  }
  long long ans = 0;
  ans += x[1] * y[4] + x[1] * y[9];
  ans += x[2] * y[3] + x[2] * y[8];
  ans += x[3] * y[2] + x[3] * y[7];
  ans += x[4] * y[1] + x[4] * y[6];
  ans += x[5] * y[0] + x[5] * y[5];
  ans += x[6] * y[9] + x[6] * y[4];
  ans += x[7] * y[8] + x[7] * y[3];
  ans += x[8] * y[7] + x[8] * y[2];
  ans += x[9] * y[6] + x[9] * y[1];
  ans += x[0] * y[5] + x[0] * y[0];
  cout << ans << endl;
}
