using System;
public class Program
{
public static void Main()
int[] a = {1,0,0,1,2,0,2,1,2};
int count1 = 0;
int count2 = 0;
int count3 = 0;
int temp = count1;
for(int i =0; i<a.Length;i++)
if(a[i] == 0) count1++;
if(a[i] == 1) count2++;
if(a[i] == 2) count3++;
}
for(int j=0;j<temp;j++)
a[j] = temp;
if(a[j] == temp)
j = temp;