#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000007;
template <class T>
T bigmod(T b, T p, T m) {
  if (p == 0) return 1;
  T res = bigmod(b, p / 2, m);
  res = (res * res) % m;
  if (p % 2 == 1) res = (res * b) % m;
  return res;
}
template <class T>
T gcd(T x, T y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
template <typename T>
T modinv(T num, T m) {
  return bigmod(num, m - 2, m);
}
int main() {
  long long i, j, k, l, m, n;
  cin >> i >> j >> k >> l >> m;
  k /= 2;
  l /= 7;
  m /= 4;
  long long res = min(i, min(j, k));
  res = min(res, min(l, m));
  cout << res;
  return 0;
}
