Pregunta de entrevista de Knoldus Software

Given elements from 1 to n, find the missing number.