How many words can be made using the letters of the word SYZYGY? (words of abitrary lengths is allowed)

I understand that for at most one Y, so thess are the words made out of SYZG, the number of ways of doing it is 65

but then I dunno how to find the rest,,

can someone explain it please?

The answer is:

Two Ys

With All Three Ys

Adding the sum together:

Thanks!