#include <bits/stdc++.h>
using namespace std;
// Function to get the missing element
int getMissingNo(int a[], int n)
{
int i, total = 1;
for (i = 2; i <= (n + 1); i++) {
total += i;
total -= a[i - 2];
}
return total;
}
// Driver Program
int main()
{
int arr[] = { 1, 2, 3, 5 };
int N = sizeof(arr) / sizeof(arr[0]);
// Function call
cout << getMissingNo(arr, N);
return 0;
}
// This code is contributed by Aditya Kumar (adityakumar129)