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

Create SockMerchant.java