#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
char IO;
int rd(){
	int num=0;bool f=0;
	while(IO=getchar(),IO<48||IO>57)if(IO=='-')f=1;
	do num=(num<<1)+(num<<3)+(IO^48);
	while(IO=getchar(),IO>=48&&IO<=57);
	return f?-num:num;
}
ll A,B,C,D;
int main(){
	A=rd(),B=rd(),C=rd(),D=rd();
	if(C*D<=B){cout<<-1;return 0;}
	cout<<(A-1)/(C*D-B)+1;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int N=2e5+10;

int n,tp;
char s[N],st[N];

int main() {
#ifdef LOCAL
	freopen("a.in","r",stdin);
	freopen("a.out","w",stdout);
#endif
	ios::sync_with_stdio(0);cin.tie(0);
	cin>>n>>(s+1);
	for(int i=1;i<=n;i++) {
		st[++tp]=s[i];
		if(st[tp-2]=='f'&&st[tp-1]=='o'&&st[tp]=='x') tp-=3;
	}
	cout<<tp;
	return 0;
}
