/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
	int[] arr={0,0,1,1,1,2,2,3,3,4};
	
	System.out.println(removeDuplicates(arr));
	}
	
	 static  int removeDuplicates(int[] nums) {
        int n = nums.length;

      int k =0;
        for(int i = 0 ;i<n;i++){
            boolean check = false;

            for(int j = 0;j < i;j++){
                if(nums[i] == nums[j]){
                    check = true;
                    break;
                }
            }


            if(!check){
                nums[k] = nums[i];
                k++;
            }
        }
        return k;
    }
}