#include <bits/stdc++.h>
using namespace std;
int X[5];
int MIN() {
  int MINIMUM = X[0];
  for (int i = 1; i < 5; i++)
    if (X[i] < MINIMUM) MINIMUM = X[i];
  return MINIMUM;
}
int main(int argc, char** argv) {
  for (int i = 0; i < 5; i++) cin >> X[i];
  X[2] /= 2;
  X[3] /= 7;
  X[4] /= 4;
  cout << MIN() << endl;
  return 0;
}
