For this Question: There is class of students. Their teacher is taking their attendance in the morning as usual. But this time, the list of students in the register feels weird. There are suddenly more names there. Apparently a few mischevious students have repeated their names in the register. Find the number of these mischevious students who have multiple names in the register.The first line of the input contains a single integer N - the number of names in the register.
The next N lines of the input each contains a string.

Constraints:
1 <= N <= 10<sup>4</sup>
1 <= |S<sub>i</sub>| <= 100Find the number of mischevious students who have multiple names in the register.Sample Input:
5
Newton
Einstein
Newton
Bohr
Einstein

Sample Output:
2

Explaination:
Only two students have repeated names in the register., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args)throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s[] = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        HashMap<String, Integer> hm = new HashMap<>();

        for(int i=0; i<n; i++){
            s = br.readLine().split(" ");
            if(hm.containsKey(s[0])){
                hm.put(s[0],hm.get(s[0])+1);
            }else{
                hm.put(s[0],1);
            }
        }
        int count=0;
        for(Integer val:hm.values()){
            if(val>1){
                count++;
            }
        }
        System.out.print(count);


    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?