#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a7a;
  int x, y, z, l, m;
  cin >> x >> y >> z >> l >> m;
  a7a.push_back(x);
  a7a.push_back(y);
  a7a.push_back(z / 2);
  a7a.push_back(l / 7);
  a7a.push_back(m / 4);
  cout << *min_element(a7a.begin(), a7a.end());
  return 0;
}
