#include using namespace std; using ll=long long; int main(){ ll K;cin>>K; const int N=16; const int MK=217; vector aja(N,vector(N,false)); for(int i=0;i<4;i++) for(int j=0;j<3;j++){ aja[i*4+j][i*4+j+1]=1; aja[i*4+j+1][i*4+j]=1; } for(int i=0;i<3;i++) for(int j=0;j<4;j++){ aja[i*4+j][i*4+j+4]=1; aja[i*4+j+4][i*4+j]=1; } vector br(1<>x&1){ for(int y=0;y>y&1)){ if(aja[x][y])cnt++; } } br[msk]=cnt; } vector dp(1<>i&1)){ ll nmsk=msk|(1LL<