A Padovan string P(n) for a natural number n is defined as:
P(0)=''X''
P(1)=''Y''
P(2)=''Z''
for a string characters ''X'',''Y'',''Z'' only,and given value of n,write a program that counts the number of occurences of the string in the n-th Padovan string P(n)