#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define mt make_tuple #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; while(cin >> n) { vll d(n); rep(i, n)cin >> d[i]; sort(all(d)); ll x, y; cin >> x >> y; x = abs(x), y = abs(y); ll z = max(x, y); ll ans = 0; if(z == 0) ans = 0; else if(binary_search(all(d), z)) { ans = 1; } else if(d.back() > z) { ans = 2; } else { ans = (z + d.back() - 1) / d.back(); } cout << ans << endl; } }