We have a string S of length N consisting of 'R' , 'G' and 'B'.
Find the number of triples (i, j, k) (1 ≤ i < j < k ≤ N) that satisfy both of the following conditions:
Input is given from Standard Input in the following format:
N S
Print the number of triplets in question.
Only the triplet (1, 3, 4) satisfies both conditions. The triplet (2, 3, 4) satisfies the first condition but not the second, so it does not count.