#include <bits/stdc++.h>
int amt[] = {1, 1, 2, 7, 4};
int ans, x;
int main() {
  ans = 101;
  for (int i = 0; i < 5; i++) {
    scanf("%d", &x);
    if (x / amt[i] < ans) ans = x / amt[i];
  }
  printf("%d\n", ans);
}
