#include using namespace std; typedef long long ll; typedef vector vi; typedef vector vl; typedef pair pii; typedef pair pll; typedef int _loop_int; #define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i) #define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i) #define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i) #define DEBUG(x) cout<<#x<<": "< P; int main(){ int n; cin>>n; vi d(n); REP(i,n)cin>>d[i]; int x,y; cin>>x>>y; x = max(x,y); int maxd = *max_element(ALL(d)); int ans = 1e9+100; REP(msk,1<>i)&1)sum+=d[i]; sum = x-sum; if(sum>0)cnt += (sum+maxd-1)/maxd; if(sum%maxd != 0)cnt += 1; CHMIN(ans,cnt); } cout<