#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int a, b, c, d, e;
  cin >> a >> b >> c >> d >> e;
  a = a / 1;
  b = b / 1;
  c = c / 2;
  d = d / 7;
  e = e / 4;
  int sivan[] = {a, b, c, d, e};
  sort(sivan, sivan + 5);
  cout << sivan[0];
  return 0;
}
