You are given a string s=s_1s_2... s_n of length n, which only contains digits 1, 2, ..., 9.

A substring s[l ... r] of s is a string s_l s_{l + 1} s_{l + 2} … s_r. A substring s[l ... r] of s is called even if the number represented by it is even. 

Find the number of even substrings of s. Note, that even if some substrings are equal as strings, but have different l and r, they are counted as different substrings.

Input

The first line contains an integer n (1 ≤ n ≤ 65000) — the length of the string s.

The second line contains a string s of length n. The string s consists only of digits 1, 2, ..., 9.

Output

Print the number of even substrings of s.

Examples

Input


4
1234


Output


6

Input


4
2244


Output


10

Note

In the first example, the [l, r] pairs corresponding to even substrings are: 

  * s[1 ... 2]
  * s[2 ... 2]
  * s[1 ... 4]
  * s[2 ... 4]
  * s[3 ... 4]
  * s[4 ... 4] 



In the second example, all 10 substrings of s are even substrings. Note, that while substrings s[1 ... 1] and s[2 ... 2] both define the substring "2", they are still counted as different substrings.

"""
def three_numbers():
    numbers = list(map(int, input().split(sep=' ')))
    m = max(numbers)
    for i in numbers:
        if i != m:
            print(m - i, end=' ')


def gen_and_card_game():
    card = input()
    my_cards = list(input().split(sep=' '))
    for i in my_cards:
        if i[0] == card[0] or i[1] == card[1]:
            print('YES')
            break
    else:
        print('NO')


def kazak_vus_and_contest():
    a, b, c = map(int, input().split(sep=' '))
    if a - b <= 0 and a - c <= 0:
        print('YES')
    else:
        print('NO')


def like_A():
    st = input()
    count_a = 0
    for i in st:
        if i == 'a':
            count_a += 1
    if count_a > len(st) - count_a:
        print(len(st))
    else:
        print(count_a + count_a - 1)


def three_piece_candies():
    n = int(input())
    for i in range(n):
        a, b, c = map(int, input().split(sep=' '))
        print((a + b + c) // 2)


def re_encryption():
    n = int(input())
    encryption = input()
    decipherment = ''
    k = 0
    while 0 != n:
        k += 1
        n -= k
    for i in range(1, k + 1):
        decipherment += encryption[0]
        encryption = encryption[i:]
    print(decipherment)


def two_type_burgers():
    n = int(input())
    for i in range(n):
        a, b, c = map(int, input().split(sep=' '))
        p_b, p_c = map(int, input().split(sep=' '))
        sum = 0
        if p_b > p_c:
            if a - b * 2 >= 0:
                a = a - b * 2
                sum += b * p_b
                if a - c * 2 >= 0:
                    sum += c * p_c
                else:
                    sum += a // 2 * p_c
            else:
                sum += a // 2 * p_b
        else:
            if a - c * 2 >= 0:
                a = a - c * 2
                sum += c * p_c
                if a - b * 2 >= 0:
                    sum += b * p_b
                else:
                    sum += a // 2 * p_b
            else:
                sum += a // 2 * p_c
        print(sum)


def throw_cub():
    n = int(input())
    for i in range(n):
        k = int(input())
        if k % 7 == 1:
            count = k // 7 + 1
        else:
            count = k // 7 + (k % 7 > 0)
        print(count)


def nasty_read_book():
    n = int(input())
    pages = list()
    for i in range(n):
        a, b = map(int, input().split(sep=' '))
        pages.append(a)
    current_page = int(input())
    for i in range(n - 1):
        if pages[i] <= current_page < pages[i + 1]:
            print(len(pages) - i)
            break
    else:
        print(1)


def Tokitsukaze_and_upgrade():
    n = int(input())
    residue = n % 4
    if residue == 0:
        print('1 A')
    elif residue == 1:
        print('0 A')
    elif residue == 2:
        print('1 B')
    else:
        print('2 A')


def make_triangle():
    a, b, c = map(int, input().split())
    if a + b > c:
        if a + c > b:
            if c + b > a:
                print(0)
            else:
                print(a - c - b + 1)
        else:
            print(b - a - c + 1)
    else:
        print(c - a - b + 1)


def phones_numbers():
    n = int(input())
    for i in range(n):
        count = int(input())
        number = input()
        if len(number) < 11:
            print('NO')
        else:
            if number.find('8', 0, len(number) - 10) > -1:
                print('YES')
            else:
                print('NO')


"""


def even_lines():
    n = int(input())
    number = input()
    count = 0
    for i in range(n):
        if int(number[i]) % 2 == 0:
            count += i + 1
    print(count)


even_lines()
