#include <bits/stdc++.h>
using namespace std;
char buf[1000];
int a[100];
int b[] = {1, 1, 2, 7, 4};
int main() {
  for (int i = 0; i < 5; i++) scanf("%d", a + i);
  int ans = 10000000;
  for (int i = 0; i < 5; i++) {
    ans = min(ans, a[i] / b[i]);
  }
  cout << ans << endl;
}
