Find missing number in a array of size N containing numbers 1 to N