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.FileNotFoundException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;
import java.lang.*;


/**
 * Created by Emil on 2016-12-17.
 */

public class Main {

    long snabbExponering(long b, long n, int mod) {
        int ans = 1;
        while(n!=0){
            if (n % 2 == 0) {
                b = b * b % mod;
                n = n / 2;
            } else {
                ans *= b;
                ans %= mod;
                n = n - 1;
            }
        }
        return ans;
    }

    void printArray(int[][] array) {
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j]);
                System.out.print(" ");
            }
            System.out.println();
        }
    }

    void printArray(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]);
            System.out.print(" ");
        }
        System.out.println();
    }

    void printArray(ArrayList array) {
        for (int i = 0; i < array.size(); i++) {
            System.out.print(array.get(i));
            System.out.print(" ");
        }
        System.out.println();
    }

    Boolean[] strTobools(String input){
        Boolean[] out = new Boolean[input.length()];
        for (int i = 0; i < input.length(); i++) {
            out[i] = ( (input.charAt(i)=='+')?true:false );
        }
        return out;
    }

    private List<String> bolToString(boolean[][] board) {
        List<String> ans = new ArrayList<>();
        for (int i = 0; i < board.length; i++) {
            StringBuilder sb = new StringBuilder();
            for (int j = 0; j < board.length; j++) {
                sb.append((board[i][j])?'Q':'.');
            }
            ans.add(sb.toString());
        }
        return  ans;
    }

    public static boolean[][] deepCopy(boolean[][] original) {
        if (original == null) {
            return null;
        }

        final boolean[][] result = new boolean[original.length][];
        for (int i = 0; i < original.length; i++) {
            result[i] = Arrays.copyOf(original[i], original[i].length);
        }
        return result;
    }

    //---------------------------------------------------------------------------------


    void solve (InputStream is, PrintStream ps) {
        Scanner input = new Scanner(is);;
        int n = input.nextInt();
        String str = input.next();
        int count = 0;

        for (int i = 0; i < n; i++) {
            if(str.charAt(i) == '0'){
                System.out.print(count);
                count=0;
            }else{
                count++;
            }
        }

        System.out.println(count);

        //ps.println( (n>2) && (n%2 == 0) ? "YES" : "NO");
    }


    public static void main(String[] args) throws FileNotFoundException {
        //InputStream instream = new FileInputStream("C-large.in");
        Main obj = new Main();
        //PrintStream outstream = new PrintStream("output");
        new Main().solve(System.in, System.out);

    }



}