#include <bits/stdc++.h>
using namespace std;
int a[6], idx = 1e9, x;
int main() {
  cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
  a[2] /= 2;
  a[3] /= 7;
  a[4] /= 4;
  for (int i = 0; i < 5; i++) {
    idx = min(a[i], idx);
  }
  cout << idx << endl;
  return 0;
}
