#include <bits/stdc++.h>
int main(void) {
  int a, b, c, d, e;
  int s = INT_MAX;
  scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
  s = ((s < a / 1) ? (s) : (a / 1));
  s = ((s < b / 1) ? (s) : (b / 1));
  s = ((s < c / 2) ? (s) : (c / 2));
  s = ((s < d / 7) ? (s) : (d / 7));
  s = ((s < e / 4) ? (s) : (e / 4));
  printf("%d\n", s);
  return 0;
}
