#include #include #include #include #include #include #include #include #include #include #define mkp make_pair #define mkt make_tuple #define rep(i,n) for(int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const ll MOD=1e9+7; int main(){ int N; ll P; cin>>N>>P; vector A(N,0); A[0]=0; A[1]=1; for(int i=2;i