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 (GCC 9.2.1) (judge verdict: Wrong Answer)

#include<stdio.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>

/*
	入力例：
	3
	1 1 3
*/
int main(){
	int iDataNum,st,sx,sy,i;
	int ct,cx,cy;
	int strInput[1];
	for(int i=0;i<1;i++){
	 scanf("%d", &strInput[i]);
	}

	int strInput2[strInput[0]];
	for(int i=0;i<strInput[0];i++){
	 scanf("%d", &strInput2[i]);
	}

	int cnt[1000001]={0};
	int iRetCnt;
	iRetCnt=0;
	for(int i=0;i<strInput[0];i++){

		for(int j=strInput2[i];j<1000001;j+=strInput2[i]){
			if(cnt[j]>=1){
				cnt[j]=2;
				continue;
			}
			cnt[j]=1;
		}
	}
	for(int i=0;i<strInput[0];i++){
		if(cnt[strInput2[i]]==1){
			iRetCnt++;
		}
	}
	printf("%d\n",iRetCnt);

  return 0;
}