#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  int a[] = {1, 1, 2, 7, 4};
  int res = 1000, x;
  for (int i = (0); i < (5); ++i) {
    cin >> x;
    res = min(res, x / a[i]);
  }
  printf("%d\n", res);
  return 0;
}
