#include #define F first #define S second using namespace std; typedef long long ll; typedef pair P; typedef pair PP; ll n,m,mem[5000001]; string s[30]; vector v; ll fib(ll a,ll b){ if(mem[a])return mem[a]; if(a==1)return 0; if(a==2)return 1; return mem[a]=(fib(a-1,b)+fib(a-2,b))%b; } int main(void){ cin>>n>>m; cout<