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