#include <bits/stdc++.h>
using namespace std;
int i, v[100], rasp = 1 << 30;
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie();
  for (i = 1; i <= 5; ++i) cin >> v[i];
  v[3] /= 2;
  v[4] /= 7;
  v[5] /= 4;
  for (i = 1; i <= 5; ++i) rasp = min(rasp, v[i]);
  cout << rasp;
  return 0;
}
