#include using namespace std; using ll=long long; using ull=unsigned long long; using pii=pair; #define INF LONG_MAX #define MOD1 1000000007 #define MOD2 998244353 #define MOD MOD1 #define rng(a) a.begin(),a.end() #define rrng(a) a.end(),a.begin() #define endl "\n" #define int ll mapprime_factor(int x){ mapres; for(int i=2;i*i<=x;i++){ while(x%i==0){ res[i]++; x/=i; } } if(x!=1)res[x]=1; return res; } signed main(){ ios::sync_with_stdio(false); cin.tie(0); int N,K,M; cin>>N>>K>>M; auto p=prime_factor(M); int ans=LONG_LONG_MAX; for(auto it:p){ int res=0; int m=1; for(int i=0;iN/M){ break; } d*=m; } ans=min(ans,res); } cout<