Krish has stopped flipping binders due to fear of prosecution and has been reduced to playing games like League of Legs. Krish mains the toe master, Dariutoe, which is the only character with accesss to the most powerful weapon, called the TriThigh. To build for the TriThigh, however, Krish must look at a list of numbers and tell you how many pairs have a sum divisible by 3! Because the only thing Krish is good at is League of Legs, he has asked you to help him figure it out!

The first line of input will contain N, the number of Integers. The next line will contain N (1≤N≤10^5) integers i (1≤i≤10^5).

The output will consist of 1 integer, the number of pairs that are divisble by 3.

`5`

1 4 2 3 3

`3`

- Points: 5
- Time limit: 1.0s
- Memory limit: 64.0M
- Author: Averesoft
- Category: Classics
- Type: Simple Math
- All Submissions Best Submissions