mint d[1d6][3];ll n;{rd(n);*d[0..1]=1;rep(i,n)d[i+(1..3)][0..]+=d[i][(1..)%3]+d[i][(2..)%3];wt(sum(d[n](3)));}