It's giving me output 5 when I enter 5,1,2,3,4,5 (where first 5 is the size) Please help!