Under construction

Still being built. Things may change

Odd Even Game

Time limit1sMemory limit1024 MB

Summary
Count the even and odd digits of a given N-digit number K and print 0 if evens are more, 1 if odds are more, or -1 if they are equal.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Minku wants to play an odd-even game with a positive integer KK that has NN digits.

The odd-even game goes as follows.

  1. For each digit, check whether the digit is even or odd. The digit 00 is even.
  2. After every digit has been checked, compare the number of even digits with the number of odd digits.
  3. If there are more even digits than odd digits, the given number is an even-even number. If there are more odd digits than even digits, it is an odd-odd number.

Minku has trouble counting the digits of a very long number, so write a program that plays the game for him.

Input

The first line contains the number of digits NN. (1≤N≤106)(1 \le N \le 10^6)

The second line contains a natural number KK. (1≤K)(1 \le K)

The positive integer KK never begins with 00.

Output

Print 00 if the given natural number is an even-even number, 11 if it is an odd-odd number, and −1-1 if it is neither.

Examples3

  1. Example 1

    Input
    9
    123456789
    
    Expected output
    1
    
  2. Example 2

    Input
    7
    1234568
    
    Expected output
    0
    
  3. Example 3

    Input
    8
    12345678
    
    Expected output
    -1