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 Main {

	public static void main(String[] args) throws IOException, InterruptedException {
		Scanner sc = new Scanner(System.in);
	//	PrintWriter pw = new PrintWriter(System.out);
		int n = sc.nextInt();
		String s = sc.nextLine();
		int c = 0;
		StringBuilder res = new StringBuilder();
		for (int i = 0; i <s.length(); i++) {
			if(s.charAt(i)=='0') {
				res.append(c);
				c = 0;
			}
			else {
				c++;
			}
		}
		
			res.append(c);
		System.out.println(res);
	}
	
}

class pair {
	double x;
	double y;

	public pair(double x, double y) {
		this.x = x;
		this.y = y;
	}
}

class edge implements Comparable<edge> {
	int from;
	int dest;
	double cost;

	public edge(int from, int dest, double cost) {
		this.from = from;
		this.dest = dest;
		this.cost = cost;
	}

	public int compareTo(edge o) {

		if (cost == o.cost) {
			if (from == o.from)
				return dest - o.dest;
			return from - o.from;
		}
		if(cost>o.cost)
			return 1;
		if(cost<o.cost)
			return -1;
		return 0;
	}

}
class Scanner {
	StringTokenizer st;
	BufferedReader br;

	public Scanner(InputStream s) {
		br = new BufferedReader(new InputStreamReader(s));
	}

	public String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	public String nextLine() throws IOException {
		return br.readLine();
	}

	public double nextDouble() throws IOException {
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if (x.charAt(0) == '-') {
			neg = true;
			start++;
		}
		for (int i = start; i < x.length(); i++)
			if (x.charAt(i) == '.') {
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			} else {
				sb.append(x.charAt(i));
				if (dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg ? -1 : 1);
	}

	public boolean ready() throws IOException {
		return br.ready();
	}

}