#C12429. Filter Numbers Divisible by 3

    ID: 41855 Type: Default 1000ms 256MiB

Filter Numbers Divisible by 3

Filter Numbers Divisible by 3

Given a list of integers, your task is to filter out numbers that are divisible by 3. In addition, you must print the total number of elements processed before printing the filtered results.

The program should first output the message: Number of elements processed: n, where n is the count of input numbers. On the next line, output the filtered list of numbers (those divisible by 3) in the same order as they appear in the input, separated by spaces. If no numbers are divisible by 3, the second line should be empty. Note that 0 is considered divisible by 3.

Input is read from STDIN and output is written to STDOUT.

inputFormat

The first line contains an integer n representing the number of elements. The second line contains n space-separated integers.

outputFormat

The first line should print: Number of elements processed: n, where n is the number of input integers. The second line should print the space-separated list of numbers that are divisible by 3. If there are no such numbers, output an empty line.

## sample
6
1 3 4 6 7 9
Number of elements processed: 6

3 6 9

</p>