#include <bits/stdc++.h>
int main() {
  int a[6];
  scanf("%d %d %d %d %d", &a[1], &a[2], &a[3], &a[4], &a[5]);
  a[1] /= 1;
  a[2] /= 1;
  a[3] /= 2;
  a[4] /= 7;
  a[5] /= 4;
  int min = a[1];
  for (int i = 1; i <= 5; i++)
    if (a[i] < min) min = a[i];
  printf("%d", min);
}
