Problem: Polycarp has just invented a new binary protocol for data transmission. He is encoding positive integer decimal number to binary string using following algorithm:

  * Each digit is represented with number of '1' characters equal to the value of that digit (for 0 it is zero ones). 
  * Digits are written one by one in order corresponding to number and separated by single '0' character. 



Though Polycarp learnt how to encode the numbers, he has no idea how to decode them back. Help him calculate the decoded number.

Input

The first line contains one integer number n (1 ≤ n ≤ 89) — length of the string s.

The second line contains string s — sequence of '0' and '1' characters, number in its encoded format. It is guaranteed that the number corresponding to the string is positive and doesn't exceed 109. The string always starts with '1'.

Output

Print the decoded number.

Examples

Input

3
111


Output

3


Input

9
110011101


Output

2031

Solution (in JAVA):

Solution:

import java.io.*;
import java.util.*;

public class CodeForce
{
    public static void main(String[] args)
    {
        InputReader in = new InputReader(System.in);
        PrintWriter p = new PrintWriter(System.out);
        int n=in.nextInt();
        String str=in.readString();
        char[] arr=str.toCharArray();
        str="";
        int count=0;
        for (int i = 0; i < n; i++) {
            if(arr[i]=='1'){
                count++;
            }
            else{
                str=str+count;
                count=0;
            }
        }
        if(count!=0)
            str=str+count;
        if(arr[n-1]=='0')
            str+='0';
        p.print(str);
        p.flush();
        p.close();
    }
	
	
    public static int KMP(String text, String pattern){
        int n = text.length();
        int m = pattern.length();

        int fail[] = computeFailArray(pattern);
        int i=0;
        int j=0;
        while(i<n){
            if(text.charAt(i)==pattern.charAt(j)){          
                i++;
                j++;
                if(j==m){
                    return i-j;      
                }
            }
            else if(j>0)
                j=fail[j-1];
            else
                i++;            
        }
        return -1;
    }

    public static int[] computeFailArray(String pattern){
        int m = pattern.length();
        int fail[] = new int[m];
        fail[0] = 0;
        int j=0;
        int i=1;
        while(i<m){
            if(pattern.charAt(j)==pattern.charAt(i)){
                fail[i]=j+1;
                j++;
                i++;
            }
            else if(j>0){
                j=fail[j-1];
            }
            else
                i++;       
        }
        return fail;
    }

    static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}