#include using namespace std; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>v>>t>>p; auto check=[&](Int x){ return 1+(x-2)/t+v*(p+1)>=x; }; Int l=0,r=2e18; // check(l) = true; // check(r) = false; while(l+1>1; if(check(m)) l=m; else r=m; } cout<