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.util.*;
import java.io.*;

public class ProbA {
	public static void main(String[] args) {
		ProbA sol = new ProbA();
		sol.start();
	}

	StringBuffer printstr;
	String _readerstr;
	BufferedReader rdr;
	HashSet<Integer> debug_number_set;
	int[] debug_code;

	public void print(Object o){ print(o, 0); }
	public void print(Object o, int debug_number){
		if(debug_number_set.contains(debug_number)) System.out.print(o);
	}
	public void println() { print("\n", 0); }
	public void println(Object o) { println(o, 0); }
	public void println(Object o, int debug_number){ print(o+"\n", debug_number); }

	public void bufp(Object o){ printstr.append(o); }
	public void bufpl(Object o){ printstr.append(o).append('\n'); }
	public void bufpl() { printstr.append('\n'); }
	public void bufp(char[] c, int offset, int len){ printstr.append(c, offset, len); }
	public void bufpl(char[] c, int offset, int len){ printstr.append(c, offset, len).append('\n'); }
	
	public Integer readInt(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		try{
			return Integer.parseInt(s[0]);
		}
		catch(Exception e){}
		return readInt();
	}
	
	public Long readLong(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		try{
			return Long.parseLong(s[0]);
		}
		catch(Exception e){}
		return readLong();
	}
	
	public Double readDouble(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		try{
			return Double.parseDouble(s[0]);
		}
		catch(Exception e){}
		return readDouble();
	}
	
	public String readStr(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String[] s = _readerstr.split(" ", 2);
		if(s.length==1) _readerstr = null;
		else _readerstr = s[1];
		return s[0];
	}
	
	public String readLine(){
		try{
			if(_readerstr==null) _readerstr = rdr.readLine();
		}
		catch(Exception e){ return null; }
		String ret = _readerstr;
		_readerstr = null;
		return ret;
	}
	
	public void initiate_the_entire_program(){
		printstr = new StringBuffer();
		_readerstr = null;
		try{
			rdr = new BufferedReader(new InputStreamReader(System.in));
		}
		catch(Exception e){ println(e); }
		debug_number_set = new HashSet();
		for(int i : debug_code) debug_number_set.add(i);
	}

	public void start(){
		debug_code = new int[] {0,1,2,3,4,5};
		initiate_the_entire_program();
		
		submit();
		
		System.out.println(printstr);
		System.out.flush();
	}
	
	public void submit(){
		int n = readInt();
		if(n==0){
			bufpl(0);
			return;
		}
		char[] code = readLine().toCharArray();
		if(n==1 && code[0]=='0'){
			bufpl(0);
			return;
		}
		bufpl(decode(code));
	}
	
	public String decode(char[] code){
		Stack<Integer> stack = new Stack();
		int c = 0;
		for(int i=0;i<code.length;i++){
			if(code[i]=='0'){
				stack.push(new Integer(c));
				c = 0;
			}
			else{
				c += 1;
			}
		}
		stack.push(new Integer(c));
		char[] ret = new char[stack.size()];
		for(int i=ret.length-1;i>=0;i--) ret[i] = (char) (stack.pop()+'0');
		return new String(ret);
	}
}