#include <bits/stdc++.h>
using namespace std;
int main() {
  int d[] = {1, 1, 2, 7, 4};
  int a[5];
  int res = 99999;
  for (int i = 0; i < int(5); ++i) {
    scanf("%d", &a[i]);
    res = min(res, (a[i] / d[i]));
  }
  printf("%d\n", res);
  return 0;
}
