#include using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { const int mod = 1e9+7; int n, x, y, p, q, ans; cin >> n; int d[n]; rep(i, p){ cin >> d[i]; } cin >> x >> y; if (x < 0) x *= -1; if (y < 0) y *= -1; p = max(x, y); q = min(x, y); ans = 0; rep(i, n) if (d[i] == p); ans = 1; if (ans == 0){ if (p > d[0]){ ans = (p + d[n-1] - 1) / d[n-1]; } else ans = 2; } cout << ans << endl; return 0; }