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.
from math import ceil, log, floor, sqrt
import math	
	
	
k = 1	
def mod_expo(n, p, m):
	"""find (n^p)%m"""
	result = 1
	while p != 0:
		if p%2 == 1:
			result = (result * n)%m
		p //= 2
		n = (n * n)%m
	return result
	
def is_prime(n):
	m = 2
	while m*m <= n:
		if n%m == 0:
			return False
		m += 1
	return True
	
def find_sum(n, a):
	a.insert(0, 0)
	for i in range(1, n+1):
		prev = a[i] & a[i-1]
		cur = a[i] | a[i-1]
		a[i-1] = prev
		a[i] = cur
	return sum(m*m for m in a)

def prin_abc(x, y, z):
	l = [x, y, z]
	l.sort()
	if l[1] < l[2]:
		print("NO")
		return 
	a = b = l[0]
	c = l[2]
	print("YES")
	print(a, b, c)
	
def get_scores(n, vals):
	l = 0
	r = n-1
	turn = 0
	sereja = 0
	dima = 0
	while l <= r:
		if vals[l] > vals[r]:
			cur = vals[l]
			l += 1
		else:
			cur = vals[r]
			r -= 1
		if turn == 0:
			sereja += cur
		else:
			dima += cur
		turn = not turn
	print(sereja, dima)
		
def count_lamps(n, m):
	return (n*m + 1)//2
	
def find_holidays(n):
	cnt = 2*(n//7)
	rem = n%7
	#if n < 7:
	#	print(0, cnt)
	mx = mn = cnt
	if rem == 1:
		mx += 1
	elif rem > 1:
		mx += 2
	if rem == 6:
		mn += 1
	
	print(mn, mx)
	
def nc2(n):
	return (n*(n-1))//2	
	
def is_even(n):
	ev = ['2',  '4', '6', '8']
	return n in ev
	
def cnt_evn_substr(n, s):
	cnt = 0
	for i in range(n):
		if is_even(s[i]):
			cnt += i+1
	return cnt
		
t = 1
#t = int(input())
while t:
	t = t - 1
	k, g = 0, 0
	points = []
	n = int(input()) 
	a = input()
	#b = input()
	#s, v1, v2, t1, t2 = map(int, input().split()) 
	#n, S  = map(int, input().split()) 
	#print(discover())
	# = map(int, input().split())
	#a = list(map(int, input().strip().split()))[:n]
	#w = list(map(int, input().strip().split()))[:k]
	#for i in range(3):
	#	x, y = map(int, input().split()) 
	#	points.append((x, y))
	#s = input()
	#if sasha_wins(n, k):
	#	print("YES")
	#else:
	#	print("NO")
	#get_cnt(a,  b);
	print(cnt_evn_substr(n, a))
