#include <bits/stdc++.h>
using namespace std;
int a[5];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 0; i < 5; ++i) cin >> a[i];
  a[2] /= 2;
  a[3] /= 7;
  a[4] /= 4;
  cout << *min_element(a, a + 5);
  return 0;
}
