#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // c++11 #include #include #include #include #define mp make_pair #define mt make_tuple #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair; const int INF = 1 << 29; const double EPS = 1e-9; const ll MOD = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1}; int N; vector D; ll X,Y; int main() { cin >> N; D.resize(N); for (auto &val : D){ cin >> val; } cin >> X >> Y; sort(D.begin(), D.end()); ll max_XY = max(abs(X), abs(Y)); ll max_d = D[N - 1]; for (const auto &val : D){ if (max_XY == val){ cout << 1 << endl; return 0; } } ll res = max_XY / max_d; if (max_XY % max_d != 0){ if (res == 0){ res += 2; }else{ res += 1; } } cout << res << endl; return 0; }