#include<bits/stdc++.h> using namespace std; long long a,c,q,p,r,x,t; int main(){ cin>>a>>c>>p>>q>>r>>x; while(t<x){ if(a<c&&t+p<=x){ t+=p; a++; } if(c==a&&t+q<=x){ t+=q; a++; } if(a>c&&t+r<=x){ t+=r; a++; } } cout<<a; }