I donot get the number of input in this program if i put the number of input

import java.util.*;

public class dotcom{

public static void main(String Args[]){
    Scanner s = new Scanner(System.in);
    System.out.println("Input :");
    int i = s.nextInt();
    ArrayList<String> mylist = new ArrayList<String>();

    System.out.println(mylist.size());

    for(int x=1 ; x<=i ; x++){    \ if I put I=2 then it would take only 1 input instead of 2 
        String sc=s.nextLine();
        mylist.add(sc);
    }
    System.out.println(mylist.size());
}

}

pls help me

I am trying to learn array list