Problem:
Score : 100 points

Problem Statement

We have five variables x_1, x_2, x_3, x_4, and x_5.

The variable x_i was initially assigned a value of i.

Snuke chose one of these variables and assigned it 0.

You are given the values of the five variables after this assignment.

Find out which variable Snuke assigned 0.

Constraints

The values of x_1, x_2, x_3, x_4, and x_5 given as input are a possible outcome of the assignment by Snuke.

Input

Input is given from Standard Input in the following format:

x_1 x_2 x_3 x_4 x_5

Output

If the variable Snuke assigned 0 was x_i, print the integer i.

Sample Input 1

0 2 3 4 5

Sample Output 1

1

In this case, Snuke assigned 0 to x_1, so we should print 1.

Sample Input 2

1 2 0 4 5

Sample Output 2

3

Solution in C# (.NET Core 3.1.201) (judge verdict: Accepted)

using System;
using static System.Console;
using static Atcoder_Template_NetCore3.MyUtil;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;
using System.Threading.Tasks;
using System.IO;

namespace Atcoder_Template_NetCore3
{
    class Program
    {
        static void Main()
        {
            var input = ReadintArray();
            WriteLine(Array.IndexOf(input, 0) + 1);
        }
    }

    static class MyUtil
    {
        /// <summary>
        /// 指定の桁のビットを取得します。
        /// </summary>
        /// <param name="num"></param>
        /// <param name="count">取得する桁。</param>
        /// <returns></returns>
        public static int GetBit(this int num, int count)
        {
            int mask = (int)Math.Pow(2, count - 1);
            return (num & mask) == 0 ? 0 : 1;
        }

        /// <summary>
        /// <c>int</c>を2進数ビット配列に変換します。
        /// </summary>
        /// <param name="num"></param>
        /// <returns></returns>
        public static int[] ToBitArray(this int num)
        {
            const int size = sizeof(int) * 8;
            var array = new int[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = num.GetBit(size - i);
            }
            return array;
        }

        #region AutoGeneratedCode 整数読み取り系
        public static ValueTuple<int, int> ReadInt2()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1]);
        }
        public static ValueTuple<long, long> ReadLong2()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1]);
        }
        public static ValueTuple<int, int, int> ReadInt3()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2]);
        }
        public static ValueTuple<long, long, long> ReadLong3()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2]);
        }
        public static ValueTuple<int, int, int, int> ReadInt4()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3]);
        }
        public static ValueTuple<long, long, long, long> ReadLong4()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3]);
        }
        public static ValueTuple<int, int, int, int, int> ReadInt5()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4]);
        }
        public static ValueTuple<long, long, long, long, long> ReadLong5()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4]);
        }
        public static ValueTuple<int, int, int, int, int, int> ReadInt6()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5]);
        }
        public static ValueTuple<long, long, long, long, long, long> ReadLong6()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5]);
        }
        public static ValueTuple<int, int, int, int, int, int, int> ReadInt7()
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5], input[6]);
        }
        public static ValueTuple<long, long, long, long, long, long, long> ReadLong7()
        {
            var input = Console.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
            return (input[0], input[1], input[2], input[3], input[4], input[5], input[6]);
        }
        #endregion
        /// <summary>
        /// 標準入力からスペース区切りの数値を <see cref="int"/> 配列として読み取ります。
        /// </summary>
        /// <returns></returns>
        public static int[] ReadintArray()
        {
            return ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        }

        /// <summary>
        /// 標準入力からスペース区切りの数値を <see cref="long"/> 配列として読み取ります。
        /// </summary>
        /// <returns></returns>
        public static long[] ReadlongArray()
        {
            return ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();
        }

        /// <summary>
        /// <see cref="IEnumerable{T}"/>の各要素を並べてコンソールに出力します。各要素の間には半角スペースが一つ入ります。
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="ts"></param>
        public static void WriteToConsole<T>(this IEnumerable<T> ts)
        {
            StringBuilder stringBuilder = new StringBuilder();
            foreach (T t in ts)
            {
                stringBuilder.Append(t.ToString());
                stringBuilder.Append(" ");
            }
            stringBuilder.Remove(stringBuilder.Length - 1, 1);
            Console.WriteLine(stringBuilder.ToString());
        }
    }
}