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