#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 #include using namespace std; #define REP(i, n) for (int (i) = 0; (i) < (n); (i)++) #define FOR(i, a, b) for (int (i) = (a); (i) < (b); (i)++) #define RREP(i, a) for(int (i) = (a) - 1; (i) >= 0; (i)--) #define FORR(i, a, b) for(int (i) = (a) - 1; (i) >= (b); (i)--) #define DEBUG(C) cerr << #C << " = " << C << endl; using LL = long long; using VI = vector; using VVI = vector; using VL = vector; using VVL = vector; using VD = vector; using VVD = vector; using PII = pair; using PDD = pair; using PLL = pair; using VPII = vector; template using VT = vector; #define ALL(a) begin((a)), end((a)) #define RALL(a) rbegin((a)), rend((a)) #define SORT(a) sort(ALL((a))) #define RSORT(a) sort(RALL((a))) #define REVERSE(a) reverse(ALL((a))) #define MP make_pair #define FORE(a, b) for (auto &&a : (b)) #define FIND(s, e) ((s).find(e) != (s).end()) #define EB emplace_back const int INF = 1e9; const int MOD = INF + 7; const LL LLINF = 1e18; long long gcd(long long a, long long b) { if(a < b) swap(a, b); long long ret = 1; while(b) {ret = b; b = a % b; a = ret;} return ret; } long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); } int n; set d; int x, y; int main(void) { cin >> n; REP(i, n) { int buf; cin >> buf; d.insert(buf); } cin >> x >> y; if (x == y && x == 0) { cout << 0 << endl; return 0; } int dis = max(abs(x), abs(y)); FORE(e, d) { if (e == dis) { cout << 1 << endl; return 0; } } int maxd = *max_element(ALL(d)); int ans = dis / maxd; ans += ans == 0; if (maxd * ans == dis) { cout << ans << endl; } else { cout << ans + 1 << endl; } }