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 10^9. The string always starts with '1'.


-----Output-----

Print the decoded number.


-----Examples-----
Input
3
111

Output
3

Input
9
110011101

Output
2031

Difficulty: interview

Starter code:

Solutions:
input()
print(''.join(str(len(x)) for x in input().split('0')))



import sys
#sys.stdin=open("data.txt")
input=sys.stdin.readline

num=""
cnt=0

input()
for ch in input().strip()+"0":
    if ch=="1":
        cnt+=1
    else:
        num+=str(cnt)
        cnt=0

print(num)

input()
print(''.join(map(str,list(map(len,input().split('0'))))))


n = int(input())
string = input()
numbers = string.split("0")
a = ""
for x in numbers:
    a += str(len(x))
a = int(a)
print(a)

input()
s = input()

print("".join(map(str, list(map(len, s.split("0"))))))


S = int(input())
s = input().split('0')

ans = ''
for c in s:
    ans += str(len(c))
print(ans)


input()
print("".join([str(len(i)) for i in list(map(str, input().split("0")))]))

n = int(input())
a = list(input().split('0'))
for i in a:
     print(len(i), end="")

input()
print(''.join(map(str, list(map(len, input().split('0'))))))


n = int(input())
s = list(input().split('0'))
print(''.join([str(len(ls)) for ls in s]))



n = int(input())
s = input()
curr = 0

for char in s:
    if char == '1':
        curr += 1
    else:
        print(curr, end = '')
        curr = 0
        
print(curr)


n = int(input())
ans = ''
for i in input().split('0'):
    ans += str(len(i))
print(ans)


n = int(input())
s = input()

l = s.split('0')

le = len(l)

ans = 0

for i in range(le):
    t = l[i]
    ans *= 10
    ans += len(t)

print(ans)


input()
s = input().split('0')
for d in s: print(len(d), end='')

n=input()
a=list(map(str, input().split('0')))
ans=""
for i in a:
    ans+=str(len(i))
print(ans)


input()
s = input().split('0')
print(''.join(str(len(i)) for i in s))


N = int(input())
li = input().split('0')
for i in range(len(li)):
    li[i] = li[i].count('1')

if len(li) == 0:
    print ("0")
else:
    li = list(map(str,li))
    print("".join(li))
    


n=int(input())
a=input().split('0')
ans=0
for i in a:
	ans=ans*10+len(i)
print(ans)

#!/usr/local/bin/python3

input()

binary_number = input()

splitted = binary_number.split('0')
digits = list(map(len, splitted))
print(''.join(map(str, digits)))


n = int(input())
s = input() + '0'
answer = 0
current = 0
for i in range(n + 1):
    if s[i] == '1':
        current += 1
    else:
        answer = answer * 10 + current
        current = 0
print(answer)

s=input()
s=''
for x in input().split('0'):
	s+=str(len(x))
print(s)	


l=int(input())
data = input().split('0')
for i in data:
    print(len(i),end='')


n = int(input())
s = input().split("0")
ans = ""
for a in s:
    if a == "":
        ans = ans + str(0)
    else:
        ans = ans + str(len(a))
print(ans)

input()
s = input().strip()
n = 0
for c in s:
    if c == '1':
        n += 1
    else:
        print(n, end='')
        n = 0
print(n)

n = int(input())
line = input() 

ans = 0
for s in line.split("0"):
	ans *= 10
	ans += len(s)
	
print(ans)