#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rrep(i,n) for(int i=(n)-1; i>=0; i--)
#define FOR(i,a,b) for(int i=(a); i<(b); i++)
#define RFOR(i,a,b) for(int i=(b-1); i>=(a); i--)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define pb push_back
using ll = long long;
using D = double;
using LD = long double;
using P = pair<int, int>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main(){
    ll a,b,c,d; cin >> a >> b >> c >> d;
    if(c*d-b <= 0){
        cout << "-1" << endl;
        return 0;
    }
    else{
        cout << (a+c*d-b-1)/(c*d-b) << endl;
    }
}

#include <cstdio>
#include <cctype>
#define FOR(i,j,k) for(int i=j; i<=k; ++i)
inline int read (void) {
	int x = 0, f = 1, ch = getchar();
	while(!isdigit(ch)) { if(ch == '-') f = -f; ch = getchar(); }
	while(isdigit(ch)) { x = x * 10 + ch - '0'; ch = getchar(); }
	return x * f;
}
const int maxn = 20;
int h, w, ans, tot1, tot2;
bool flag[maxn][maxn];
void dfs (int x, int y) {
	if(y > w) {	y = 1; ++ x; }
	if(x > h) { ++ ans; return ; }
	if(flag[x][y]) dfs (x, y+1);
	else {
		if(tot2) {
			-- tot2; flag[x][y] = 1;
			dfs (x, y+1);
			++ tot2; flag[x][y] = 0;
		}
		if(tot1 && y + 1 <= w && !flag[x][y+1]) {
			-- tot1; flag[x][y] = flag[x][y+1] = 1;
			dfs (x, y+2);
			++ tot1; flag[x][y] = flag[x][y+1] = 0;
		}
		if(tot1 && x + 1 <= h && !flag[x+1][y]) {
			-- tot1; flag[x][y] = flag[x+1][y] = 1;
			dfs (x, y+1);
			++ tot1; flag[x][y] = flag[x+1][y] = 0;
		}
	}
}
int main (void) {
	h = read(), w = read(), tot1 = read(), tot2 = read();
	dfs (1, 1);
	printf("%d\n", ans);
	return 0;
}