#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long a[5];
  for (long long i = 0; i < 5; i++) cin >> a[i];
  long long minn = 2147483647;
  a[2] /= 2;
  a[3] /= 7;
  a[4] /= 4;
  for (long long i = 0; i < 5; i++) minn = min(minn, a[i]);
  cout << minn << endl;
}
