Ternary numeric notation is quite popular in Berland. To telegraph the ternary number the Borze alphabet is used. Digit 0 is transmitted as «.», 1 as «-.» and 2 as «--». You are to decode the Borze code, i.e. to find out the ternary number given its representation in Borze alphabet.

Input

The first line contains a number in Borze code. The length of the string is between 1 and 200 characters. It's guaranteed that the given string is a valid Borze code of some ternary number (this number can have leading zeroes).

Output

Output the decoded ternary number. It can have leading zeroes.

Examples

Input

.-.--


Output

012

Input

--.


Output

20

Input

-..-.--


Output

1012
'''try:
  t=int(input())
  for z in range(t):
    n=int(input())
    
    if(n&n-1==0):
        
        print("-1")

    else:
 
        print(2,3,1, end=" ")
        i=4
        while(i<n+1):
            if(i & i-1 ==0):
                print(i+1,i,end=" ")
                i+=2
            else:
                print(i,end=" ")
               
                i+=1
        print()


        
        




      
    
except:
  pass

def f(n):
    if(n==1):
        return 1
    
    
    c=1
    for i in range(1,int(n**0.5)+1):
        if(n%i==0):
            c+=1
    
  
    return c
t=int(input())
for z in range(t):
    n=int(input())
    if(n==1):
        print(1)
    else:
        ans=0
        for i in range(1,n):
            ans+=f(i)

            if(ans>=n):
                break
        print(i)


x,y,z=map(int,input().split())
s=input()
a=s[:y]
b=s[y+1:]
a=sorted(a)
b=sorted(b)
ans=[]
for i in range(y):
    for j in range(y):
        s1=a[i]+b[j]
        ans.append(s1)
print(ans[z-1])'''


'''/s=input()
t=input()
ans=""
i=0
j=0
n1=len(s)
n2=len(t)
while(i<n1 and j<n2):
    ans+=s[i]
    ans+=t[j]
    i+=1
    j+=1
while(i<n1):
    ans+=s[i]
    i+=1
while(j<n2):
    ans+=t[j]
    j+=1
print(ans'''

s=input()
n=len(s)
i=0
s1=""
while(i<n-1):
    if(s[i]=='-' and s[i+1]=='.'):
        s1+="1"
        i+=2
    elif(s[i]=='-' and s[i+1]=='-'):
        s1+="2"
        i+=2
    elif(s[i]=='.'):
        s1+="0"
        i+=1
if(i==n-1 and s[n-1]=='.'):
    s1+="0"
    
if(n==1 and s[0]=='.'):
    print("0")
elif(n==2):
    s_1="-."
    s_0=".."
    s_2="--"

    if(s==s_1):
        print("1")
    elif(s==s_0):
        print("00")
    else:
        print("2")

else:

    print(s1)