#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, e, g[6];
  cin >> a >> b >> c >> d >> e;
  g[0] = a / 1;
  g[1] = b / 1;
  g[2] = c / 2;
  g[3] = d / 7;
  g[4] = e / 4;
  sort(g, g + 5);
  cout << g[0] << endl;
}
