#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v(5);
  int i, min;
  for (i = 0; i < 5; i++) cin >> v[i];
  v[2] /= 2;
  v[3] /= 7;
  v[4] /= 4;
  min = 999999;
  for (i = 0; i < 5; i++) {
    if (v[i] < min) min = v[i];
  }
  cout << min;
  return 0;
}
