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