First position P89078


Statement
 

pdf   zip

html

Write a program that reads a sequence of natural numbers and prints the position of the first even number.

Input

Input consists of a sequence of natural numbers that contains, at least, one even number.

Output

Print the position of the first even number of the sequence.

Public test cases
  • Input

    1 3 5 7 9 0 2 4 6 8
    

    Output

    6
    
  • Input

    16 8 4 2
    

    Output

    1
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    C C++ Java Lua Python