Given an unsorted integer array containing sequential values starting from 1 find the missing value. There is guaranteed to be only one missing value and the array is not sorted.

Strive to solve in O(n) with O(1) space.

for the array [1,2,3,5] the answer would be 4.