#include <bits/stdc++.h>
using namespace std;
const int maxn = 25;
int a[maxn];
int main() {
  int i;
  for (i = 0; i < 5; i++) scanf("%d", &a[i]);
  a[2] /= 2;
  a[3] /= 7;
  a[4] /= 4;
  sort(a, a + 5);
  cout << a[0] << endl;
  return 0;
}
