#include <iostream>
#include <math.h>
using namespace std;

int main() {
	double k,p,s,n; int y;
	cin>>k>>p>>s>>n;
	if ((k<=0)||(p<=0)||(s<=0)||(n<=0)) {cout<<"Неверные денные";} 
	else {
		y = ceil(log(n*s/k)/log(p)); 
		cout<<y; 
	}
}