@@ -0,0 +1,592 @@
+import java.io.*;%0Aimport java.util.*;%0Aimport java.text.*;%0Aimport java.math.*;%0Aimport java.util.regex.*;%0A%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        int n = in.nextInt();%0A        int c%5B%5D = new int%5Bn%5D;%0A        for(int c_i=0; c_i %3C n; c_i++)%7B%0A            c%5Bc_i%5D = in.nextInt();%0A        %7D%0A        Arrays.sort(c);%0A        int sum=0;%0A        for(int i=0;i%3Cn-1;i++)%7B%0A            if(c%5Bi%5D==c%5Bi+1%5D)%7B%0A                sum++;%0A                i++;%0A            %7D%0A            %0A        %7D%0A        System.out.println(sum);%0A    %7D%0A%7D%0A

add SockMerchant.java