using System;
public class Program
{
public static void Main()
int[] arr = new int[]{6,4,10,3,0,1};
int temp;
for(int i=0; i<arr.Length; i++)
if(arr[i] == arr[i+1])
temp = arr[i];
}
Console.WriteLine(arr[i]);