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

import java.io.*;
import java.util.* ;

public class HelloWorld {

    public  static void main (String args [] ) throws IOException ,InterruptedException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);

        StringBuilder a = new StringBuilder() ;
        String s = sc.nextLine() ;

        boolean z = false ;
        for (int i = 0 ; i<s.length()-1 ; i++ ) {
            if (s.charAt(i) =='.'){
                a.append(0) ;
            }
            else if (s.charAt(i)=='-' && s.charAt(i+1)=='.'){
                a.append(1) ;
                if (i==s.length()-2)
                z = true ;
                i++ ;
            }
            else {
                a.append(2) ;
                if (i==s.length()-2)
                z = true ;
                i++ ;
            }
        }
        if (s.charAt(s.length()-1) =='.' && !z )
            a.append(0);

        pw.println(a.toString());

        pw.close();
     }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

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

        public Scanner(String file) throws Exception {
            br = new BufferedReader(new FileReader(file));
        }

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

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

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

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public char nextChar() throws IOException {
            return next().charAt(0);
        }

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

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

        public void waitForInput() throws InterruptedException {
            Thread.sleep(3000);
        }
    }
}
