class FindTheMissingNumber {

  public int find(int[] numbers) {
    validateInput(numbers);

    int length = numbers.length;
    int idealSum = length * (length + 1) / 2;
    int sum = calculateSum(numbers);

    int missingNumber = idealSum - sum;
    return missingNumber;
  }

}