ll@n,x=1,c;rep(3){c=0;rep(n){ll@a;a%3&&c++;}x*=c;}wt(x);