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.

import java.util.*;
import java.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.Scanner; 
import java.util.StringTokenizer; 
  
public class Graph
{ 	
static int ans=0;
	
	static int rank[];
	static int p[];
	static int max=0;
	static int a,b,c,n;
	static ArrayList<Long> arr;
    ArrayList<Graph> adj;
	int parent;
	int indeg;
	int outdeg;
	int child;
	int value;
	int vis;
	int dist;
	static Graph graph[];
	
	Graph(int val)
	{
		adj=new ArrayList<>();
		parent=-1;
		indeg=0;
		outdeg=0;
		child=-1;
		value=val;
		vis=0;
		dist=0;
		
	}
	//unordered here
	static void add_edge(int u,int v)
	{
		graph[u].adj.add(graph[v]);
		graph[v].adj.add(graph[u]);
	}
	
	static int lower_bound(int start,int end,long value) 
	{

		while(start<end)
		{
			int mid=(start+end)/2;
			if(arr.get(mid)>=value)
			end=mid;
			else start=mid+1;
		}if(arr.get(start)<=value)
			return start+1;
		else
		
		return start;
	}

	static int upper_bound(int start,int end,long value) {

		while(start<end)
		{
		int mid=(start+end)/2;
		if(arr.get(mid)<=value)
			start=mid+1;
		else end=mid;
		}
		if(arr.get(start)<=value)
			return start+1;
		else
		
		return start; 
	} 

	/*static boolean check(char [] word, int index) {
		for (char cc : word) {
		if (cc != c[index]) {
			return false;
		}
		index++;
		}
		return true;
	}*/
  static void dfs(int index)
  {
	  Graph z=graph[index];
	  z.vis=1;max++;
	  for(int i=0;i<z.adj.size();i++)
	  {
		  if(z.adj.get(i).vis==0)
		  {
			  z.adj.get(i).dist=z.dist+1;
			  //System.out.println(z.adj.get(i).dist);
			
			  dfs(z.adj.get(i).value-1);
		  }
	  }
  }
  static void initialize(int n)
  {
	  for( int i=1; i<=n; i++)
	  {		  
			rank[i]=0;
			p[i]=i;
	  }
  }//apply two heuristics to get req. time complexity
  static int findSet(int a)
  {
	  if(p[a]!=a)
	  {
		  p[a]=findSet(p[a]);
	  }
	  return p[a];
  }
  static void mergeSet(int a, int b)
  {
	  int sa=findSet(a);
	  int sb=findSet(b);
	  if(sa!=sb)
	  {
		  ans--;
		  if(rank[sa]>rank[sb])
		  {
			  p[sb]=sa;
		  }
		  else if(rank[sb]>rank[sa])
		  {
			  p[sa]=sb;
		  }
		  else
		  {
			  p[sa]=sb;
			  rank[sb]++;
		  }
	  }
  }

  
    public static void main(String[] args) 
    { 
        FastReader sc=new FastReader(); 

		
				
		
        /*Queue<Graph> q=new LinkedList<>();
        q.add(graph[index]);
        while(!q.isEmpty())
        {
            Graph z=q.peek();
            q.poll();
			z.vis=1;
           for(int i=0;i<z.adj.size();i++)
		   {
			   if(z.adj.get(i).vis==0)
			   {
				   z.adj.get(i).vis=1;
					q.add(z.adj.get(i));
			   }
                
            }
            
        }*/
		
		//min heap
		/*PriorityQueue<Long> min=new PriorityQueue<>();
		//in case you need max heap i'm here ;0
		//just a note you can create a class that can have compare method as well here use that in you want to sort according to a parameter
		PriorityQueue<Integer> max=new PriorityQueue<>(new Comparator<Integer>()
		{
			@Override
			public int compare(Integer o1, Integer o2)
			{
				return Integer.compare(o2,o1);
			}
		});*/
		
		int n=sc.nextInt();
		String str=sc.next();long ans=0;
		for(int i=0;i<str.length();i++)
		{
			int x=(int)(str.charAt(i)-'0');
			if(x%2==0)
			{
				ans+=(i+1);
			}
		}
System.out.println(ans);		
		
		
		
			
    }
	static class Pair
	{
		int x;
		int y;
		Pair(int a, int b)
		{
			this.x =a;
			this.y =b;
		}
	}
	
	static class FastReader 
    { BufferedReader br; 
        StringTokenizer st;  public FastReader() { 
            br = new BufferedReader(new InputStreamReader(System.in)); } 
			String next() { 
            while (st == null || !st.hasMoreElements()) 
            { try{ st = new StringTokenizer(br.readLine()); 
                } catch (IOException  e) 
                { e.printStackTrace(); 
                }} return st.nextToken(); 
        } int nextInt() { return Integer.parseInt(next()); 
        }
        long nextLong() 
        {  return Long.parseLong(next()); 
        }
        double nextDouble() 
        { return Double.parseDouble(next()); 
        } 
        String nextLine() 
        {String str = ""; 
            try
            { str = br.readLine(); 
            } 
            catch (IOException e) 
            { e.printStackTrace(); 
            } return str; }}

} 
	
	
	
	
	
	
	
		