#include <bits/stdc++.h>
using namespace std;
int mx, t, r, c, l;
long long a[1000010], b[1000010];
long long sum, n;
char d1, d2, d[350][350];
bool bl1, bl2;
map<char, int> mp, mp2;
pair<int, int> pr[300010], temp[300010];
vector<int> vect;
string str1, str2;
set<int> st;
queue<char> q;
bool srt(const pair<int, int>& z, const pair<int, int>& x) {
  return (x.first < z.first);
}
int main() {
  cin >> r >> l;
  c = r / 5;
  for (int i = 1; i <= 5; i++) {
    a[i] = c;
    if (i <= r % 5) a[i]++;
  }
  c = l / 5;
  for (int i = 1; i <= 5; i++) {
    b[i] = c;
    if (i <= l % 5) b[i]++;
  }
  sum += a[1] * b[4];
  sum += a[2] * b[3];
  sum += a[3] * b[2];
  sum += a[4] * b[1];
  sum += a[5] * b[5];
  cout << sum << endl;
  return 0;
}
