#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n, m;
  cin >> n >> m;
  long long cnt = 0;
  for (long(i) = 0; (i) < (n); (i)++) {
    for (long(j) = 0; (j) < (m); (j)++) {
      if ((i + 1 + j + 1) % 5 == 0) {
        cnt += (m - (j + 1)) / 5;
        ++cnt;
        break;
      }
    }
  }
  cout << cnt << endl;
}
