#include <bits/stdc++.h>
using namespace std;
long long tab1[5];
long long tab2[5];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i < n + 1; i++) {
    switch (i % 5) {
      case 0:
        tab1[0]++;
        break;
      case 1:
        tab1[1]++;
        break;
      case 2:
        tab1[2]++;
        break;
      case 3:
        tab1[3]++;
        break;
      case 4:
        tab1[4]++;
        break;
    }
  }
  for (int i = 1; i < m + 1; i++) {
    switch (i % 5) {
      case 0:
        tab2[0]++;
        break;
      case 1:
        tab2[1]++;
        break;
      case 2:
        tab2[2]++;
        break;
      case 3:
        tab2[3]++;
        break;
      case 4:
        tab2[4]++;
        break;
    }
  }
  long long x = tab1[0] * tab2[0] + tab1[1] * tab2[4] + tab1[2] * tab2[3] +
                tab1[3] * tab2[2] + tab1[4] * tab2[1];
  cout << x << endl;
  return 0;
}
