using System;
using System.Linq;
public class Program
{
public static void Main()
var items = new int[] {4,2,3,4,2,7,8,1};
var smallestNumber = 1;
for (int i = 1; i < items.Length; i++)
if (items.Contains(smallestNumber))
smallestNumber++;
}
Console.WriteLine(smallestNumber);