#include<iostream>
#include<string>
#include<array>
using namespace std;

int main() {
	int a, b, c,d;
	cin >> a >> b >> c >> d;
	cout << a * d - b * c;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,c,d,k,sum;
	scanf("%d %d %d %d",&a,&b,&c,&d);
	k=c*d-b;
	if(k<=0){
		printf("-1\n");
	}else{
		sum=a/k;
		if(sum*k<a)
			sum++;
		printf("%d\n",sum);
	}
	return 0;
}