static void Main(string[] args) { int[] temp = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int tempId = Convert.ToInt32(Console.ReadLine()); Console.WriteLine((temp.ToList().IndexOf(tempId)) + 1); Console.ReadLine(); }