#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c, d, e, min = 0;
  cin >> a >> b >> c >> d >> e;
  if (a / 1 > min) min = a / 1;
  if (b / 1 < min) min = b / 1;
  if (c / 2 < min) min = c / 2;
  if (d / 7 < min) min = d / 7;
  if (e / 4 < min) min = e / 4;
  cout << min;
  return 0;
}
