Length[Tuples[{r,g,y},5]]