#include using namespace std; //#include //using namespace atcoder; using ll=long long; using Graph=vector>; #define MAX 200003 #define MOD 1000000007 #define INF 1000000000 ll modpow(ll a,ll x){ ll ret=1; a%=MOD; while(x>0){ if(x%2==1){ ret=ret*a%MOD; } x>>=1; a=a*a%MOD; } return ret; } int main(){ ll P,K; cin>>P>>K; ll sum0=1; ll sum1=0; for(int i=0;i