#include <bits/stdc++.h>
using namespace std;
int main() {
  int min = 100;
  int tmp;
  cin >> tmp;
  if (tmp < min) {
    min = tmp;
  }
  cin >> tmp;
  if (tmp < min) {
    min = tmp;
  }
  cin >> tmp;
  if (tmp / 2 < min) {
    min = tmp / 2;
  }
  cin >> tmp;
  if (tmp / 7 < min) {
    min = tmp / 7;
  }
  cin >> tmp;
  if (tmp / 4 < min) {
    min = tmp / 4;
  }
  cout << min << '\n';
  return 0;
}
