#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;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglkb3VibGUgayxwLHMsbjsgaW50IHk7CgljaW4+Pms+PnA+PnM+Pm47CglpZiAoKGs8PTApfHwocDw9MCl8fChzPD0wKXx8KG48PTApKSB7Y291dDw8ItCd0LXQstC10YDQvdGL0LUg0LTQtdC90L3Ri9C1Ijt9IAoJZWxzZSB7CgkJeSA9IGNlaWwobG9nKG4qcy9rKS9sb2cocCkpOyAKCQljb3V0PDx5OyAKCX0KfQ==