#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double eps = 1E-6;
int a[] = {1, 1, 2, 7, 4};
int main() {
  int sum = INF, n;
  for (int i = 0; i < 5; i++) {
    cin >> n;
    sum = min(sum, n / a[i]);
  }
  cout << sum << endl;
  return 0;
}
