A string is binary, if it consists only of characters "0" and "1".

String v is a substring of string w if it has a non-zero length and can be read starting from some position in string w. For example, string "010" has six substrings: "0", "1", "0", "01", "10", "010". Two substrings are considered different if their positions of occurrence are different. So, if some string occurs multiple times, we should consider it the number of times it occurs.

You are given a binary string s. Your task is to find the number of its substrings, containing exactly k characters "1".

Input

The first line contains the single integer k (0 ≤ k ≤ 106). The second line contains a non-empty binary string s. The length of s does not exceed 106 characters.

Output

Print the single number — the number of substrings of the given string, containing exactly k characters "1".

Please do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specifier.

Examples

Input

1
1010


Output

6


Input

2
01010


Output

4


Input

100
01010


Output

0

Note

In the first sample the sought substrings are: "1", "1", "10", "01", "10", "010".

In the second sample the sought substrings are: "101", "0101", "1010", "01010".
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigInteger;
public class Solution
{
    static class Pair{
        int parent;
        int rank;
        Pair(int parent,int rank)
        {
            this.rank=rank;
            this.parent=parent;
        }
    }
    static int find(Pair pr[],int i)
    {
        if(i==pr[i].parent)
            return i;
        else
        {
            pr[i].parent=find(pr,pr[i].parent);
            return pr[i].parent;
        }
    }
    static void join(Pair[] pr,int i,int j)
    {
        i=find(pr,i);
        j=find(pr,j);
        if(i==j)
            return;
        if(pr[i].rank>=pr[j].rank)
        {
            pr[j].parent=i;
            pr[i].rank+=pr[j].rank;
        }
        else
        {
            pr[i].parent = j;
            pr[j].rank+=pr[i].rank;
        }
    }
    static void swap(char ar[],int i,int j)
    {
        char f = ar[i];
        ar[i]=ar[j];
        ar[j]=f;
    }
    static TreeSet<Integer> hs;
    static HashSet<Integer> graph[] ;
	public static void main (String[] args) throws IOException
	{
            StringBuilder sb = new StringBuilder();
            FastReader s1 = new FastReader();
            int k =s1.I();
            String s = s1.next();
            int n = s.length();
            long ar[] = new long[n+10];
            int c=0;
            ar[0]=1;
            int count1=0;
            long ans=0;
            for(int i=0;i<n;i++)
            {
                count1+=s.charAt(i)-'0';
                if(count1>=k)
                {
                    ans+=ar[count1-k];
                }
                ar[count1]++;
            }
            System.out.println(ans);
        }
        static int digit(long n)
        {
            int val=0;
            while(n>0)
            {
                n=(n>>1);
                val++;
            }
            return val;
        }
        static int binary(int left,int right,int ar[],int no)
        {
             int mid=(left+right)/2;
             if(Math.abs(right-left)<=1)
             {
                 if(no>=ar[right])
                 {
                     return right+1;
                 }
                 else if(no<ar[left])
                 {
                     return left;
                 }
                 else
                 {
                      return left+1;
                 }
             }
             if(ar[mid]>no)
             {
                 right=mid-1;
                 return binary(left, right, ar, no);
             }
             else{
                 left=mid;
                 return binary(left, right, ar, no);
                         }
        }
	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 I() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long L() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double D() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }
    static int gcd(int a,int b)
		{
		    if(a%b==0)
		    return b;
		    return gcd(b,a%b);
		}
	static float power(float x, int y) 
    { 
        float temp; 
        if( y == 0) 
            return 1; 
        temp = power(x, y/2);  
          
        if (y%2 == 0) 
            return temp*temp; 
        else
        { 
            if(y > 0) 
                return x * temp * temp; 
            else
                return (temp * temp) / x; 
        } 
    } 
//        static long pow(long x,long y)
//        {
//            int m=1000000007;
//            x=x%m;
//            if(y==1)
//                return x;
//            long ans=1;
//            long val=pow(x,y/2)%m;
//            ans=(val*val)%m;
//            if(y%2!=0)
//            {
//                ans=(val*x)%m;
//            }
//            return ans%m;
//        }
      static long pow(long x, long y) 
    { 
        int p = 1000000007;
        long res = 1;      
        x = x % p;  
        while (y > 0) 
        { 
            if((y & 1)==1) 
                res = (res * x) % p;
            y = y >> 1;  
            x = (x * x) % p;  
        } 
        return res; 
    } 
    static ArrayList<Integer> sieveOfEratosthenes(int n) 
    { 
        ArrayList<Integer> arr=new ArrayList<Integer>();
        boolean prime[] = new boolean[n+1]; 
        for(int i=2;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            if(prime[p] == true) 
            { 
                arr.add(p);
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 
        return arr;
    } 
}