跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2589. IQ test

  • ID: 2595
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:待分级
  • 上传者:
  • 待分类
  • 整理状态
  • 难度待定
  • 难度
  • 共享题库
  • Codeforces
  • 英文题面
  • 题目来源
  • 题面语言

IQ test

题目描述

A. IQ test
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Bob is preparing to pass IQ test. The most frequent task in this test is to find out which one of the given n numbers differs from the others. Bob observed that one number usually differs from the others in evenness. Help Bob − to check his answers, he needs a program that among the given n numbers finds one that is different in evenness.

Input

The first line contains integer n (3≤n≤100) − amount of numbers in the task. The second line contains n space-separated natural numbers, not exceeding 100. It is guaranteed, that exactly one of these numbers differs from the others in evenness.

Output

Output index of number that differs from the others in evenness. Numbers are numbered from 1 in the input order.

Examples
Input
5
2 4 7 8 10
Output
3
Input
4
1 2 1 1
Output
2

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2240 题。保留原作者与原赛事署名。