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.

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 the decoded ternary number. It can have leading zeroes.

//http://codeforces.com/problemset/problem/32/B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace codeforces___32b_Borze
{
    class Program
    {
        static void Main(string[] args)
        {
            string re="";
            string s = Console.ReadLine();
            for (int i = 1; i <= s.Length; )
            {
                if (s[i - 1].Equals('-') && s[i].Equals('-'))
                {
                    re += "2";
                    i += 2;
                }
                else if (s[i - 1].Equals('-') && s[i].Equals('.'))
                {
                    re += "1";
                    i += 2;
                }
                else
                {
                    re += "0";
                    i++;
                }
            }
            Console.WriteLine(re);
        }
    }
}

using System;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string output = "";
            for (int i = 0; i < input.Length; i++)
            {
                if (input[i] == '.')
                    output += "0";

                if (i + 1 < input.Length)
                {
                    if (input[i] == '-' && input[i + 1] == '.')
                    {
                        output += "1";
                        i += 1;
                    }
                    else if (input[i] == '-' && input[i + 1] == '-')
                    {
                        output += "2";
                        i += 1;
                    }

                }
            }
            Console.WriteLine(output);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;

namespace CP_CS
{

    class Task
    {

        static void Solve()
        {
            string str = ReadToken();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < str.Length; i++)
            {
                if (str[i] == '.')
                {
                    sb.Append('0');
                }
                else
                {
                    sb.Append(str[i+1] == '.' ? '1' : '2');
                    i++;
                }
            }
            Write(sb.ToString());
        }

        static string[] Split(string str, int chunkSize)
        {
            return Enumerable.Range(0, str.Length / chunkSize)
                .Select(i => str.Substring(i * chunkSize, chunkSize)).ToArray();
        }

        #region -- Main --

        private static TextReader reader;
        private static TextWriter writer;

        static void Main()
        {
#if DEBUG
            //reader = new StreamReader("..\\..\\input.txt");
            reader = new StreamReader(Console.OpenStandardInput());
            writer = Console.Out;
            //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("pluses.in");
        //writer = new StreamWriter("pluses.out");
#endif
            try
            {
                //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
                //thread.Start();
                //thread.Join();
                Solve();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
            }
            reader.Close();
            writer.Close();
        }

        #endregion
        #region -- Read / Write --

        private static Queue<string> currentLineTokens = new Queue<string>();

        private static string[] ReadAndSplitLine()
        {
            return reader.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
        }

        private static string[] ReadAndSplitLine(char divisor)
        {
            return reader.ReadLine().Split(new[] { divisor }, StringSplitOptions.RemoveEmptyEntries);
        }

        public static string ReadToken()
        {
            while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine());
            return currentLineTokens.Dequeue();
        }

        public static int ReadInt()
        {
            return int.Parse(ReadToken());
        }

        public static long ReadLong()
        {
            return long.Parse(ReadToken());
        }

        public static BigInteger ReadBigInteger()
        {
            return BigInteger.Parse(ReadToken());
        }

        public static double ReadDouble()
        {
            return double.Parse(ReadToken(), CultureInfo.InvariantCulture);
        }

        public static int[] ReadIntArray()
        {
            return ReadAndSplitLine().Select(int.Parse).ToArray();
        }

        public static bool[] ReadBoolArray()
        {
            return ReadAndSplitLine().Select(chr => chr == "1").ToArray();
        }

        public static long[] ReadLongArray()
        {
            return ReadAndSplitLine().Select(long.Parse).ToArray();
        }

        public static double[] ReadDoubleArray()
        {
            return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();
        }

        public static int[][] ReadIntMatrix(int numberOfRows)
        {
            int[][] matrix = new int[numberOfRows][];
            for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray();
            return matrix;
        }

        public static bool[][] ReadBoolMatrix(int numberOfRows)
        {
            bool[][] matrix = new bool[numberOfRows][];
            for (int i = 0; i < numberOfRows; i++)
                matrix[i] = ReadBoolArray();
            return matrix;
        }

        public static bool[][] TransposeBoolMatrix(bool[][] array, int numberOfRows)
        {
            bool[][] matrix = array;
            bool[][] ret = new bool[matrix[0].Length][];
            for (int i = 0; i < ret.Length; i++)
            {
                ret[i] = new bool[numberOfRows];
                for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i];
            }
            return ret;
        }

        public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
        {
            int[][] matrix = ReadIntMatrix(numberOfRows);
            int[][] ret = new int[matrix[0].Length][];
            for (int i = 0; i < ret.Length; i++)
            {
                ret[i] = new int[numberOfRows];
                for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i];
            }
            return ret;
        }

        public static string[] ReadLines(int quantity)
        {
            string[] lines = new string[quantity];
            for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim();
            return lines;
        }

        public static void WriteArray<T>(IEnumerable<T> array)
        {
            writer.WriteLine(string.Join(" ", array));
        }

        public static void Write(params object[] array)
        {
            WriteArray(array);
        }
        public static void WriteLines<T>(IEnumerable<T> array)
        {
            foreach (var a in array) writer.WriteLine(a);
        }
        private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
        {
            public new TValue this[TKey key]
            {
                get { return ContainsKey(key) ? base[key] : default(TValue); }
                set { base[key] = value; }
            }
        }
        private static T[] Init<T>(int size) where T : new()
        {
            var ret = new T[size];
            for (int i = 0; i < size; i++) ret[i] = new T();
            return ret;
        }
        #endregion
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            x = x.Replace("--", "2");
            x = x.Replace("-.", "1");
            x = x.Replace(".", "0");
            Console.WriteLine(x);
        }
    }

}

using System;
using System.IO;
using System.Text;

namespace Borze
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            string s = reader.ReadLine();

            bool f = false;
            foreach (char c in s)
            {
                if (c == '.')
                {
                    writer.Write(f ? '1' : '0');
                    f = false;
                }
                else
                {
                    if (f)
                    {
                        writer.Write('2');
                        f = false;
                    }
                    else
                    {
                        f = true;
                    }
                }
            }
            writer.Flush();
        }
    }
}

using System;

class Program
{
    static void Main()
    {
        var input = Console.ReadLine();
        var output = "";
        for (int i = 0; i < input.Length; i++)
        {
            output += input[i] == '.' ? 0 : input[i + 1] == '.' ? 1 : 2;
            i += input[i] != '.' ? 1 : 0;
        }
        Console.WriteLine(output);
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace CF317
{
	internal class Program
	{
		private static void Main(string[] args)
		{
			var sr = new InputReader(Console.In);
			//var sr = new InputReader(new StreamReader("input.txt"));
			var task = new Task();
			using (var sw = Console.Out)
			{
				//using (var sw = new StreamWriter("output.txt")) {
				task.Solve(sr, sw);
				//Console.ReadKey();
			}
		}
	}

	internal class Task
	{
		public void Solve(InputReader sr, TextWriter sw)
		{
			var str = sr.NextString();
			var result = new List<int>();
			Sol(str, 0, result);
			var sb = new StringBuilder();
			for (var i = 0; i < result.Count; i++) {
				sb.Append(result[i]);
			}
			sw.Write(sb);
		}

		private bool Sol(string s, int indx, List<int> list)
		{
			if (indx == s.Length)
				return true;
			var curr = s[indx];
			if (curr == '.') {
				list.Add(0);
				return Sol(s, indx + 1, list);
			}
			if (curr == '-') {
				if (indx + 1 == s.Length)
					return false;
				var next = s[indx + 1];
				if (next == '.') {
					list.Add(1);
					return Sol(s, indx + 2, list);
				}
				if (next == '-') {
					list.Add(2);
					return Sol(s, indx + 2, list);
				}
			}
			return false;
		}
	}
}

internal class InputReader : IDisposable
{
	private bool isDispose;
	private readonly TextReader sr;

	public InputReader(TextReader stream)
	{
		sr = stream;
	}

	public void Dispose()
	{
		Dispose(true);
		GC.SuppressFinalize(this);
	}

	public string NextString()
	{
		var result = sr.ReadLine();
		return result;
	}

	public int NextInt32()
	{
		return Int32.Parse(NextString());
	}

	public long NextInt64()
	{
		return Int64.Parse(NextString());
	}

	public string[] NextSplitStrings()
	{
		return NextString()
						.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
	}

	public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
	{
		return NextSplitStrings()
						.Select(s => func(s, CultureInfo.InvariantCulture))
						.ToArray();
	}

	public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
	{
		return
						str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
										.Select(s => func(s, CultureInfo.InvariantCulture))
										.ToArray();
	}

	protected void Dispose(bool dispose)
	{
		if (!isDispose)
		{
			if (dispose)
				sr.Close();
			isDispose = true;
		}
	}

	~InputReader()
	{
		Dispose(false);
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication41
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string ans = null;
            for (int i = 0; i < s.Length; i++)
            {

                if (s[i] == '-' && s[i+1] =='-' )
                {
                    ans += 2;i++;
                }
                else if (s[i] == '-' && s[i+1]=='.')
                {
                    ans += 1;i++;
                }
                else if (s[i] == '.')
                {
                    ans += 0;

                }
            }
            Console.WriteLine(ans);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication29
{

    class Program
    {

        static void Main(string[] args)
        {
            string a = Console.ReadLine(),b="";
            for (int i = 0; i <= a.Length-1; i++)
            {
                if (a[i]=='.')
                {
                    b += "0";
                }
                else if (a[i] == '-' && a[i+1] == '.')
                {
                    b += "1";
                    i++;
                }
                else if (a[i] == '-' && a[i+1] == '-')
                {
                    b += "2";
                    i++;
                }

            }
            Console.WriteLine(b);

        }
    }
}

using System;

public static class Program
{
    public static void Main()
    {
        string broze;
        string finalNumeber = "";
        broze = Console.ReadLine();
        finalNumeber = broze.Replace("--", "2");
        finalNumeber = finalNumeber.Replace("-.", "1");
        finalNumeber = finalNumeber.Replace(".", "0");
        Console.Write(finalNumeber);
    }
}

using System;

namespace Borze
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            input = input.Replace("--", "2");
            input = input.Replace("-.", "1");
            input = input.Replace('.', '0');

            Console.WriteLine(input);
        }
    }
}

using System;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text.RegularExpressions;

//32B. Азбука Борзе

namespace CodeForces
{

    class Program
    {

        private void solve()
        {
            string s = Console.ReadLine();

            int i = 0;
            while (i < s.Length)
            {
                if (s[i] == '.')
                {
                    Console.Write('0');
                }
                else
                {
                    i += 1;
                    if (s[i] == '.')
                    {
                        Console.Write('1');
                    }
                    else
                    {
                        Console.Write('2');
                    }
                }
                i += 1;
            }
            Console.WriteLine();
        }

        static void Main()
        {
            Program app = new Program();
            app.solve();
#if DEBUG
            Console.ReadKey(true);
#endif
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            int i = 0;
            for (i = 0; i <a.Length; i++)
            {
                if (a[i] == '-' && a[i + 1] == '.')
                {
                    Console.Write("1");
                    i++;
                }else if (a[i] == '.')
                {
                    Console.Write("0");
                }
                if (a[i] == '-' && a[i + 1] == '-')
                {
                    Console.Write("2");
                    i++;
                }

            }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace task32B
{
    class Program
    {
        static void Main(string[] args)
        {
            var code = Console.ReadLine();
            Console.WriteLine(code.Replace("--", "2").Replace("-.", "1").Replace(".", "0"));
            //Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace a2oj
{
    class Program
    {

        static void Main(string[] args)
        {
        //    string all = Console.ReadLine();
        //    string[] parts = all.Split(' ');
        //    int n, t;
        //    n = int.Parse(parts[0]);
        //    t = int.Parse(parts[1]);

            string s = Console.ReadLine();
            string ans = "";

            for (int i = 0; i < s.Length;i++ )
            {
                if (s[i] == '.')
                    ans += 0;
                else if(s[i]=='-')
                {
                    if (s[i + 1] == '.')
                        ans += 1;
                    else if (s[i + 1] == '-')
                        ans += 2;
                    i++;
                }
            }
            Console.WriteLine(ans);

            //Console.ReadKey();
        }
    }
}

using System;

namespace ConsoleApplication16
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            string str = Console.ReadLine();

            char[] charArray = str.ToCharArray();

            string str1 = "";
            char f = ' ';

            if (charArray[0] == '-' && charArray[1] == '-')
            {
                str1 += '2';

                for (int i = 2; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                        f = ' ';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }
            else if (charArray[0] == '-' && charArray[1] == '.')
            {
                str1 += '1';

                for (int i = 2; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                        f = ' ';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }
            else
            {
                for (int i = 0; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                        f = ' ';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }

            Console.WriteLine(str1);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace ConsoleApplication4
{
    class Program
    {
        static int[] readArray()
        {
            string[] s = Console.ReadLine().Split(' ');
            int len = s.Length;
            int[] data = new int[len];
            for (int i = 0; i < len; i++)
            {
                data[i] = int.Parse(s[i]);
            }
            return data;
        }
        static int readInt()
        {
            string s = Console.ReadLine();
            return int.Parse(s);
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int n = s.Length;

            int cur = 0;
            while (cur < n)
            {
                if(s[cur]=='.')
                {
                    cur++;
                    Console.Write(0);
                }else if (s[cur + 1] == '.')
                {
                    cur += 2;
                    Console.Write(1);
                }else
                {
                    cur += 2;
                    Console.Write(2);
                }
            }
        }
    }
}

//int[] h = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
//Array.Sort(data, (int a,int b) => a>b?-1:a==b?0:1);

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine(p(Console.ReadLine()));
    }

    static string p(string s)
    {
        var sb = new StringBuilder();

        var i = 0;

        string b;

        while ((b = n(s, ref i)) != null)
        {
            sb.Append(b);
        }

        return sb.ToString();
    }

    static string n(string s, ref int cur)
    {
        if (cur >= s.Length)
            return null;

        if (s[cur++] == '.')
        {
            return "0";
        }

        if (cur >= s.Length)
            return null;

        if (s[cur++] == '.')
        {
            return "1";
        }

        return "2";
    }
}

using System;
using System.Text;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            StringBuilder st = new StringBuilder();
            int pos = 0;
            while (pos<s.Length)
            {
                if (s[pos] == '.')
                {
                    st.Append('0');
                    pos++;
                }
                else
                {
                    int i = pos;
                    if ((s[i] == '-') && (s[i + 1] == '.'))
                    {
                        st.Append('1');
                        pos += 2;
                    }
                    if ((s[i] == '-') && (s[i + 1] == '-'))
                    {
                        st.Append('2');
                        pos += 2;
                    }
                }
            }
            Console.WriteLine(st.ToString());
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http.Headers;
using System.Runtime.CompilerServices;
using System.Text;

namespace BorzeDecode
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            Method(ref input);
        }

        static void Method(ref string input)
        {
            var code = new List<char>();
            for (int i = 0; i < input.Length; i++)
            {
                if (input[i] == '-')
                {
                    if (input[i + 1] == '-') code.Add('2');
                    else code.Add('1');
                    i += 1;
                    continue;
                }
                else code.Add('0');
            }

            Console.WriteLine(new string(code.ToArray()));
        }
    }
}

using System;
namespace Codeforces
{

    public class Program
    {
        public static void Main()
        {
           string s = Console.ReadLine();
           string res="";
           for(int i=0; i<s.Length;)
           {
           	if(s[i]=='.')
           	{
           		res+="0";
           		i++;
           	}
           	else if( s[i+1] == '.')
           	{
           		res+="1";
           		i+=2;
           	}
           	else
           	{
           		res+="2";
           		i+=2;
           	}
           }
           Console.WriteLine(res);
        }

        static public int GetRes(int n)
        {
        	if(n==2)
        	{
        		return 2;
        	}
        	return n % 2;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{
    class _32B
    {
        public static void Main()
        {
            string s = Console.ReadLine();
            int a = s.Length;
            char[] arr = s.ToCharArray();
            for(int i = 0; i < s.Length; i++)
            {
                if (arr[i] == '.')
                    Console.Write(0);
                else
                {
                    if (arr[i + 1] == '-')
                        Console.Write(2);
                    else
                        Console.Write(1);
                    i++;
                }
            }
            Console.WriteLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACM
{
    class Program
    {
        static void Main(string[] args)
        {

            string Result="";
            string x= Console.ReadLine();
            for (int i = 0; i < x.Length; i++)
            {
                //--.
                if (x[i]==Convert.ToChar( "."))
                {
                    Result = Result + "0";

                }
                else
                {
                    try
                    {
                        if (x[i + 1] == Convert.ToChar("."))
                        {
                            Result = Result + "1";

                        }
                        else if (x[i + 1] == Convert.ToChar("-"))
                        {
                            Result = Result + "2";
                        }
                        i++;
                    }
                    catch { }
                }

            }
            Console.WriteLine(Result);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Snail
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            for(int i=0; i<s.Length; i++)
            {
                if (s[i] == '.') Console.Write(0);
                else if (s[i+1] == '-')
                {
                    Console.Write(2);
                    i++;
                }
                else
                {
                    Console.Write(1);
                    i++;
                }
            }
        }
    }
}

using System;
using System.Linq;

namespace codeforces
{

    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string rez = "";
            while (str.Length > 0)
            {
                if (str[0] == '.')
                {
                    rez += 0;
                    str = str.Remove(0, 1);
                }
                else
                {
                    if (str[1] == '.')
                        rez += 1;
                    else rez += 2;
                    str = str.Remove(0, 2);
                }
            }
                Console.WriteLine(rez);

        }
    }
}

using System;
using System.Collections.Generic;

namespace Codeforces {
	class MyClass {
		public static void Main (string[] args)
		{
			System.Threading.Thread.CurrentThread.CurrentUICulture
				= new System.Globalization.CultureInfo("ja-JP");
			string code = Console.ReadLine();
			string ans = "";
			int i=0;
			while (i<code.Length) {
				if (code[i] == '.') {
					ans += "0";
					i++;
				}
				else {
					i++;
					if (code[i] == '.') {
						ans += "1";
					}
					else {
						ans += "2";
					}
					i++;
				}
			}
			Console.WriteLine(ans);
		}
	}
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;

public class B
{
    public static void Main()
    {
        var str = Console.ReadLine();
        string res = "";
        for(int i = 0; i < str.Length; i++)
            if(str[i] == '.') res += '0';
            else if(str[++i] == '.') res += '1';
            else res += '2';
        Console.WriteLine(res);
    }
}

using System;
using System.Text;
class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            StringBuilder stringBuilder = new StringBuilder();
            for(int i = 0, crr=0; i<input.Length;)
            {
                if(input[i++]=='.')
                {
                    stringBuilder.Append((crr==0?'0':'1'));
                    crr = 0;
                }
                else
                {
                    if (crr == 0) crr++;
                    else { stringBuilder.Append('2'); crr = 0; }
                }
            }
            Console.WriteLine(stringBuilder.ToString());
        }
    }

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace CodeForces
{
    public class CodeForcesClass
    {
        public static void Main()
        {
            var line = Read<string>();
            var result = string.Empty;
            for (var i = 0; i < line.Length; i++)
            {
                if (line[i] == '.')
                {
                    result += '0';
                }
                else
                {
                    if (line[i + 1] == '.')
                    {
                        result += '1';
                    }
                    else
                    {
                        result += '2';
                    }
                    i++;
                }
            }
            Console.WriteLine(result);
        }

        // Here goes misc

        public static T Read<T>()
        {
            var line = Console.ReadLine();
            var item = Convert.ChangeType(line, typeof (T));
            return (T) item;
        }

        public static List<T> ReadList<T>(char[] delimiters = null)
        {
            var line = Read<string>();
            var split = line.Split(delimiters ?? new[] {' '});
            var list = split.Select(item => (T) Convert.ChangeType(item, typeof (T))).ToList();
            return list;
        }

        public static List<T> ReadListNlines<T>(int n, char[] delimiters = null)
        {
            var list = new List<T>();
            for (var i = 0; i < n; i++)
            {
                list.Add(Read<T>());
            }
            return list;
        }

        public static void ReadFromFile()
        {
            Console.SetIn(new StreamReader(@"..\..\input.txt"));
        }

        public static bool NextPermutation<T>(T[] items) where T : IComparable
        {
            var i = -1;
            for (var x = items.Length - 2; x >= 0; x--)
            {
                if (items[x].CompareTo(items[x + 1]) < 0)
                {
                    i = x;
                    break;
                }
            }

            if (i == -1)
            {
                return false;
            }
            var j = 0;
            for (var x = items.Length - 1; x > i; x--)
            {
                if (items[x].CompareTo(items[i]) > 0)
                {
                    j = x;
                    break;
                }
            }
            var temp = items[i];
            items[i] = items[j];
            items[j] = temp;
            Array.Reverse(items, i + 1, items.Length - (i + 1));
            return true;
        }

        public static string ReplaceChar(string str, char c, int idx)
        {
            return str.Substring(0, idx) + c + str.Substring(idx + 1);
        }
    }
}

using System;
using System.Collections.Generic;

namespace CSharp
{
    public class _32B
    {
        public static void Main()
        {
            string code = Console.ReadLine();
            var digits = new List<char>();

            for (int i = 0; i < code.Length;)
            {
                if (code[i] == '.')
                {
                    digits.Add('0');
                    i++;
                }
                else if (code[i + 1] == '.')
                {
                    digits.Add('1');
                    i += 2;
                }
                else
                {
                    digits.Add('2');
                    i += 2;
                }
            }

            Console.WriteLine(string.Concat(digits));
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace Solution
{
    class Program
    {
        static void Main(string[] args)
        {
            var str = Console.ReadLine();
            var output = string.Empty;
            for (int i = 0; i < str.Length; i++)
            {
                if (str[i] == '.')
                {
                    output += "0";
                }
                else
                {
                    if (str[i+1] == '-')
                        output += "2";
                    else
                        output += "1";
                    i++;
                }
            }
            Console.WriteLine(output);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
    {
static void Main()
{
 char[] BorzeCode = Console.ReadLine().ToCharArray();
            string Number = "";

            for (int i = 0; i < BorzeCode.Length; i++)
            {
                if (BorzeCode[i] == '.')
                {
                    Number += "0";
                }
                else if (BorzeCode[i] == '-' && BorzeCode[i + 1] == '.')
                {
                    Number += "1";
                    i++;
                }
                else if (BorzeCode[i] == '-' && BorzeCode[i + 1] == '-')
                {
                    Number += "2";
                    i++;
                }
            }

            Console.WriteLine(Number);

}

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace CP
{
    class Program
    {
        static void Main(string [] main)
        {
            string s = Console.ReadLine();
            StringBuilder result = new StringBuilder();
            for(int i = 0 ; i<s.Length; i++)
            {
                if(s[i]=='.')
                result.Append("0");
                else
                {
                    if(s[i] == '-')
                    {
                        if(s[i+1] == '.')
                        {
                            result.Append("1");
                            i++;
                        }
                        else
                        {
                            result.Append("2");
                            i++;
                        }
                    }
                }
            }
            Console.WriteLine(result);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO.Pipes;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;

class Test
{

    static long MOD = 1000000007;
    static long[] fact = new long[500001];
    static long[] factInv = new long[500001];

    // Driver code
    public static void Main()
    {

        //int t = int.Parse(Console.ReadLine());
        //while (t > 0)
        {
            // t--;
            // var input1 = Console.ReadLine().Split(' ').Select(xx => long.Parse(xx)).ToArray();
            //  var n = input1[0];
            //  var d = input1[1];
            //  var arr = Console.ReadLine().Split(' ').Select(xx => long.Parse(xx)).ToArray();

            var str = Console.ReadLine();
            List<string> dic = new List<string>();
            List<string> ansss = new List<string>();
            dic.Add(".");
            dic.Add("-.");
            dic.Add("--");
            Decode(str, dic, ansss, "");
            Console.WriteLine(ansss[0]);
        }
    }

    public static void Decode(string str, List<string> dic, List<string> ansF, string ans)
    {
        if (str == string.Empty)
        {
            ansF.Add(ans);
        }
        var ss = dic.Where(x => str.StartsWith(x)).Select(xx => new { s = str.Substring(xx.Length), t = xx });

        if (ss.Any())
        {
            foreach (var p in ss)
            {
                ans = ans + dic.IndexOf(p.t);
                Decode(p.s, dic, ansF, ans);
            }
        }

    }

    public static long BinarySearch(long[] arr, long start, long key)

    {
        long left = start;
        long right = arr.Length;

        long mid = 0;
        while (left < right)
        {
            mid = (right + left) / 2;

            // Check if key is
            // present in array
            if (arr[mid] == key)
            {

                // If duplicates are present
                // it returns the position
                // of last element
                while (mid + 1 < arr.Length && arr[mid + 1] == key)
                    mid++;
                break;
            }

            // If key is smaller,
            // ignore right half
            else if (arr[mid] > key)
                right = mid;

            // If key is greater,
            // ignore left half
            else
                left = mid + 1;
        }

        // If key is not found in array
        // then it will be before mid
        while (mid > -1 && arr[mid] > key)
            mid--;

        // Return mid + 1 because of
        // 0-based indexing of array
        return mid + 1;
    }

    public static long FastPower(long a, long b)
    {
        if (b == 0)
            return 1;

        var val = FastPower(a, b / 2);

        if (b % 2 == 0)
            return val * val % MOD;
        else
            return val * val % MOD * a % MOD;
    }

    public static void Fact()
    {
        fact[0] = 1;
        factInv[0] = FastPower(fact[0], MOD - 2);

        for (int i = 1; i <= 500000; i++)
        {
            fact[i] = i * fact[i - 1] % MOD;
            factInv[i] = FastPower(fact[i], MOD - 2);
        }

    }

    public static long NCR(long n, long r)
    {
        return fact[n] * factInv[r] % MOD * factInv[n - r] % MOD;
    }
}

using System;

namespace ContestsConsoleLab
{
    class Program
    {
        static void Main(string[] args)
        {
            string Code= Console.ReadLine();

            var codeArr = Code.ToCharArray();

            string res = "";

            for (int i = 0; i < Code.Length; i++)
            {
                if (codeArr[i] == '.')
                    res += '0';
                else if (codeArr[i] == '-' && codeArr[i + 1] == '.')
                {
                    res += '1';
                    i++;
                }
                else if (codeArr[i] == '-' && codeArr[i + 1] == '-')
                {
                    res += '2';
                    i++;
                }
            }
            Console.WriteLine(res);
        }
    }
}

#region Usings
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.IO;
using System.Linq;
#endregion
public class B
{
    private static void Solve()
    {
        string a = Read();
        a = a.Replace("--", "2");
        a = a.Replace("-.", "1");
        a = a.Replace(".", "0");
        Write(a);
    }
    #region Main
    private static TextReader reader;
    private static TextWriter writer;
    public static void Main()
    {
#if DEBUG

        //reader = new StreamReader("C:\\Users\\Axel\\Desktop\\input.txt");
        reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;

        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());

        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            Solve();

            //var thread = new Thread(new String_Task().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }
    #endregion Main
    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine()
    {
        return reader.ReadLine().Split(new[] {' ', '\t',}, StringSplitOptions.RemoveEmptyEntries);
    }
    public static string Read()
    {
        while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine());
        return currentLineTokens.Dequeue();
    }
    public static int ReadInt()
    {
        return int.Parse(Read());
    }
    public static long ReadLong()
    {
        return long.Parse(Read());
    }
    public static double ReadDouble()
    {
        return double.Parse(Read(), CultureInfo.InvariantCulture);
    }
    public static int[] ReadIntArray()
    {
        return ReadAndSplitLine().Select(int.Parse).ToArray();
    }
    public static long[] ReadLongArray()
    {
        return ReadAndSplitLine().Select(long.Parse).ToArray();
    }
    public static double[] ReadDoubleArray()
    {
        return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();
    }
    public static int[][] ReadIntMatrix(int numberOfRows)
    {
        int[][] matrix = new int[numberOfRows][];
        for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray();
        return matrix;
    }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows);
        int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = new int[numberOfRows];
            for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i];
        }
        return ret;
    }
    public static string[] ReadLines(int quantity)
    {
        string[] lines = new string[quantity];
        for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim();
        return lines;
    }
    public static void WriteArray<T>(IEnumerable<T> array)
    {
        writer.WriteLine(string.Join(" ", array));
    }
    public static void Write(params object[] array)
    {
        WriteArray(array);
    }
    public static void WriteLines<T>(IEnumerable<T> array)
    {
        foreach (var a in array) writer.WriteLine(a);
    }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new()
    {
        var ret = new T[size];
        for (int i = 0; i < size; i++) ret[i] = new T();
        return ret;
    }
    #endregion Read / Write
}

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
using System.Globalization;

namespace CodeForcesApp
{
    class B
    {
        #region Shortcuts
        static string RL() { return Console.ReadLine(); }
        static string[] RSA() { return RL().Split(' '); }
        static int[] RIA() { return Array.ConvertAll<string, int>(RSA(), int.Parse); }
        static int RInt() { return int.Parse(RL()); }
        static long RLong() { return long.Parse(RL()); }
        static double RDouble() { return double.Parse(RL()); }
        static void RInts2(out int p1, out int p2) { int[] a = RIA(); p1 = a[0]; p2 = a[1]; }
        static void RInts3(out int p1, out int p2, out int p3) { int[] a = RIA(); p1 = a[0]; p2 = a[1]; p3 = a[2]; }

        static void Swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; }
        static void Fill<T>(T[] d, T v) { for (int i = 0; i < d.Length; i++) d[i] = v; }
        static void Fill<T>(T[,] d, T v) { for (int i = 0; i < d.GetLength(0); i++) { for (int j = 0; j < d.GetLength(1); j++) { d[i, j] = v; } } }
        #endregion

        static void Main(string[] args)
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;

            //SolutionTester tester = new SolutionTester(CodeForcesTask.B);
            //tester.Test();

            Task task = new Task();
            task.Solve();
        }

        public class Task
        {
            public void Solve()
            {
                string s = RL();

                string res = "";

                while (s.Length > 0)
                {
                    if (s.StartsWith("--"))
                    {
                        res += "2";
                        s = s.Substring(2);
                    } else
                    if (s.StartsWith("-."))
                    {
                        res += "1";
                        s = s.Substring(2);
                    } else
                    if (s.StartsWith("."))
                    {
                        res += "0";
                        s = s.Substring(1);
                    }
                }
                Console.WriteLine(res);

            }
        }
    }
}

using System;
class a
{
    static void Main(string[] args)
    {
        var a = Console.ReadLine();
        string r = "";
        for (int i = 0; i < a.Length; i++)
        {
            if (a[i] == '.') r += 0;
            if(a[i] == '-')
            {
                if (a[i + 1] == '.') r += 1;
                if (a[i + 1] == '-') r += 2;
                i++;
            }
        }
        Console.WriteLine(r);
    }
}

using System;
using System.Text;

namespace CodeForces_32_b
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int pos = 0;
            StringBuilder builder = new StringBuilder(1000);
            int state = -1;
            while (pos<s.Length)
            {
                char el = s[pos];
                switch (state)
                {
                    case -1:
                        if (el=='.')
                            builder.Append("0");
                        if (el == '-')
                            state = 1;
                        break;
                    case 1:
                        if (el == '.')
                            builder.Append("1");
                        if (el == '-')
                            builder.Append("2");
                        state = -1;
                        break;
                }
                pos++;
            }
            Console.WriteLine(builder.ToString());
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace NetExperiment
{
    class Program
    {
        static void Main(string[] args)
        {
            //int l = int.Parse(Console.ReadLine());
            //int p = int.Parse(Console.ReadLine());
            //int q = int.Parse(Console.ReadLine());
            //if (p == q)
            //{
            //    Console.WriteLine((double)l / 2);
            //}
            //else
            //{

            //}
            StringBuilder input = new StringBuilder(Console.ReadLine());
            StringBuilder output = new StringBuilder();
            char prev = ' ';
            for (int i = 0; i < input.Length; i++)
            {
                if (input[i] == '.')
                {
                    if (prev == '-')
                    {
                        prev = ' ';
                        output.Append('1');
                    }
                    else
                    {
                        output.Append('0');
                    }
                }
                else
                {
                    if (prev == '-')
                    {
                        prev = ' ';
                        output.Append('2');
                    }
                    else
                    {
                        prev = '-';
                    }
                }
            }
            Console.WriteLine(output.ToString());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
             //int n=int.Parse(Console.ReadLine());
             string a=Console.ReadLine()+" ";
             for(int i=0;i<a.Length-1;i++)
             {

                  if((a[i]=='-')&&(a[i+1]=='.'))
                  {
                  Console.Write(1);
                  i++;
                  }
                  else if((a[i]=='-')&&(a[i+1]=='-'))
                  {
                  Console.Write(2);
                  i++;
                  }
                  else
                  Console.Write(0);
             }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.IO;
using System.Linq;

class Program
{

    void solve()
    {
        string s = nextString();
        string res = "";
        for (int i = 0; i < s.Length; i++)
        {
            if (s[i] == '.')
                res += "0";
            else
            {
                i++;
                if (s[i] == '.')
                    res += "1";
                else
                    res += "2";
            }

        }
        println(res);
    }

    ////////////
    private void println(int[] ar)
    {
        for (int i = 0; i < ar.Length; i++)
        {
            if (i == ar.Length - 1)
                println(ar[i]);
            else
                print(ar[i] + " ");
        }
    }
    private void println(int[] ar, bool add)
    {
        int A = 0;
        if (add)
            A++;
        for (int i = 0; i < ar.Length; i++)
        {
            if (i == ar.Length - 1)
                println(ar[i] + A);
            else
                print((ar[i] + A) + " ");
        }
    }

    private void println(string Stringst)
    {
        Console.WriteLine(Stringst);
    }
    private void println(char charnum)
    {
        Console.WriteLine(charnum);
    }
    private void println(int Intnum)
    {
        Console.WriteLine(Intnum);
    }
    private void println(long Longnum)
    {
        Console.WriteLine(Longnum);
    }
    private void println(double Doublenum)
    {
        string s = Doublenum.ToString(CultureInfo.InvariantCulture);
        Console.WriteLine(s);
    }

    private void print(string Stringst)
    {
        Console.Write(Stringst);
    }
    private void print(int Intnum)
    {
        Console.Write(Intnum);
    }
    private void print(char charnum)
    {
        Console.Write(charnum);
    }
    private void print(long Longnum)
    {
        Console.Write(Longnum);
    }
    private void print(double Doublenum)
    {
        Console.Write(Doublenum);
    }

    string[] inputLine = new string[0];
    int inputInd = 0;
    string nextLine()
    {
        return Console.ReadLine();
    }
    void readInput()
    {
        if (inputInd != inputLine.Length)
            throw new Exception();
        inputInd = 0;
        inputLine = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        if (inputLine.Length == 0)
            readInput();

    }
    int nextInt()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return int.Parse(inputLine[inputInd++]);
    }
    long nextLong()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return long.Parse(inputLine[inputInd++]);
    }
    double nextDouble()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return double.Parse(inputLine[inputInd++]);
    }
    string nextString()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return inputLine[inputInd++];
    }
    static void Main(string[] args)
    {
        new Program().solve();
    }
}

using System;
using System.IO;
using System.Reflection;
using System.Collections;

namespace ConsoleApplication1
{
    class Program
    {
        int nextInt()
        {
            int c = ' ';
            while ((c == (int)' ' || c == (int)'\n' ||
                c == (int)'\t' || c == (int)'\r')
                && c != -1)
            {
                c = Console.Read();
            }
            bool flag = false;
            if (c == '-') flag = true;
            else
                if ((c < '0' || c > '9') && c != '+') return 0;
            int res = 0;
            if (!char.IsDigit((char)c)) c = Console.Read();
            while (char.IsDigit((char)c))
            {
                res = res * 10 + (int)c - (int)'0';
                c = Console.Read();
            }
            if (flag) res = -res;
            return res;
        }

        void Solve()
        {
            string str = Console.ReadLine();
            int state = 0;
            for (int i = 0; i < str.Length; i++)
            {
                if (str[i] == '.')
                {
                    if (state == 0) Console.Write('0');
                    else
                        if (state == 1)
                        {
                            Console.Write('1');
                            state = 0;
                        }
                }
                else
                {
                    if (state == 0) state = 1;
                    else
                        if (state == 1)
                        {
                            Console.Write('2');
                            state = 0;
                        }
                }
            }
        }

        static void Main(string[] args)
        {
#if MY_SUPER_PUPER_ONLINE_JUDGE
            string strAppDir =
                        Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
            Console.SetIn(new StreamReader(strAppDir + "\\input.txt"));
            Console.SetOut(new StreamWriter(strAppDir + "\\output.txt"));
#endif
            new Program().Solve();
#if MY_SUPER_PUPER_ONLINE_JUDGE
            Console.In.Close();
            Console.Out.Close();
#endif
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.Borze
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            int j,i;
            int[] array = new int[1000];
            var l = input.Length;
            string[] s = new string[3];
            s[0] = '.'.ToString();
            s[1] = "-.".ToString();
            s[2] = "--".ToString();
            for ( i = 0,j=0; i < l;)
            {
                var x = input.Substring(i, 1);
                if (s[0]== x)
                {
                    i++;
                    array[j++] = 0;
                }
                if (l-i>=2)
                {
                    var x1 = input.Substring(i, 2);
                    if (s[1] == x1)
                    {
                        i += 2;
                        array[j++] = 1;
                    }
                    if (l-i>=2)
                    {
                        var x2 = input.Substring(i, 2);
                        if (s[2] == x2)
                        {
                            i += 2;
                            array[j++] = 2;
                        }
                    }

                }
            }

            for ( i = 0; i < j; i++)
            {
                Console.Write(array[i]);
            }
            Console.ReadLine();

        }

    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.Borze
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            int j,i;
            int[] array = new int[1000];
            var l = input.Length;
            string[] s = new string[3];
            s[0] = '.'.ToString();
            s[1] = "-.".ToString();
            s[2] = "--".ToString();
            for ( i = 0,j=0; i < l;)
            {
                var x = input.Substring(i, 1);
                if (s[0]== x)
                {
                    i++;
                    array[j++] = 0;
                }
                if (i>=l)
                {
                    continue;
                }
                if (l-i>=2)
                {
                    var x1 = input.Substring(i, 2);
                    if (s[1] == x1)
                    {
                        i += 2;
                        array[j++] = 1;
                    }
                    if (i >= l)
                    {
                        continue;
                    }
                    if (l-i>=2)
                    {
                        var x2 = input.Substring(i, 2);
                        if (s[2] == x2)
                        {
                            i += 2;
                            array[j++] = 2;
                        }
                        if (i >= l)
                        {
                            continue;
                        }
                    }

                }
            }

            for ( i = 0; i < j; i++)
            {
                Console.Write(array[i]);
            }

        }

    }
}

using System;

namespace Borze
{
    class Program
    {
        static void Main(string[] args)
        {
            string text = Console.ReadLine();
            int i = 0;
            while (i < text.Length)
            {
                if (text[i] == '.')
                {
                    Console.Write(0);
                    i = i + 1;
                }
                if (i < text.Length - 1)
                {
                    if (text[i] == '-' && text[i + 1] == '.')
                    {
                        Console.Write(1);
                        i = i + 2;
                    }

                    if (i < text.Length - 1 && text[i] == '-' && text[i + 1] == '-')
                    {
                        Console.Write(2);
                        i = i + 2;
                    }
                }
            }
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;
using System.IO;
//using System.Numerics;
using System.Globalization;

class Program
{
    static bool flag;

    static void Main()
    {
        System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
#if !ONLINE_JUDGE
        StreamWriter fout;
        Console.SetIn(new StreamReader("input.txt"));
        Console.SetOut(fout = new StreamWriter("output.txt"));
#endif
        string line = RL().Trim();

        flag = false;
        solve(line, "");

#if !ONLINE_JUDGE
            fout.Close();
#endif
    }

    static void solve(string line, string ans) {
        if (flag) return;

        if (line.Length == 0)
        {
            println(ans);
            flag = true;
        }
        else {
            if (line.Length>0 && line[0] == '.') solve(line.Substring(1), ans+"0");
            if (line.Length>1 && line[0] == '-' && line[1] == '.') solve(line.Substring(2), ans+"1");
            if (line.Length>1 && line[0] == '-' && line[1]=='-') solve(line.Substring(2), ans+"2");
        }
    }

    struct quat<T1, T2, T3, T4> { public T1 fst; public T2 snd; public T3 thr; public T4 frt; }
    struct trip<T1, T2, T3> { public T1 fst; public T2 snd; public T3 thr; }
    struct pair<T1, T2> { public T1 fst; public T2 snd; }
    static long LCM(long a, long b) { return a / GCD(a, b) * b; }
    static long GCD(long a, long b) { if (b == 0) return a; else return GCD(b, a % b); }
    static void swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; }
    static double dist(double x1, double y1, double x2, double y2) { return Math.Sqrt(Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2)); }
    static long factorial(int n) { long ans = 1; for (int i = 2; i <= n; i++) ans *= i; return ans; }
    static void fill<T>(T[] d, T v) { for (int i = 0; i < d.Length; i++) d[i] = v; }
    static void fill<T>(T[,] d, T v) { for (int i = 0; i < d.GetLength(0); i++) { for (int j = 0; j < d.GetLength(1); j++) { d[i, j] = v; } } }

    static void print(double v) { Console.Write(v); }
    static void print(long v) { Console.Write(v); }
    static void print(int v) { Console.Write(v); }
    static void print(string v) { Console.Write(v); }
    static void print(char v) { Console.Write(v); }
    //static void print(BigInteger v) { Console.Write(v); }
    static void print(String f, params object[] o) { Console.Write(f, o); }

    static void println(double v) { Console.WriteLine(v); }
    static void println(long v) { Console.WriteLine(v); }
    static void println(int v) { Console.WriteLine(v); }
    static void println(string v) { Console.WriteLine(v); }
    static void println(char v) { Console.WriteLine(v); }
    //static void println(BigInteger v) { Console.WriteLine(v); }
    static void println() { Console.WriteLine(); }
    static void println(String f, params object[] o) { Console.WriteLine(f, o); }

    static string RL() { return Console.ReadLine(); }
    static int RC() { return Console.Read(); }
    static void wait() { Console.ReadKey(true); }
    static int[] readArrayI(int n) { int[] t = new int[n]; for (int i = 0; i < n; i++) t[i] = readInt(); return t; }
    static double[] readArrayD(int n) { double[] t = new double[n]; for (int i = 0; i < n; i++) t[i] = readDouble(); return t; }

    /*static BigInteger readBigInt()
    {
        BigInteger val = 0;
        bool m = false;
        int c;
        while (((c = Console.Read()) < '0' || c > '9') && c != '-') { }
        val = (c >= '0' && c <= '9') ? c - 48 : (c == '-' ? m=true : m=false) ? 0 : 0;
        while ((c = Console.Read() - 48) >= 0 && c <= 9) val = val*10 + (m?-c:c);
        return val;
    }*/

    static double readDouble()
    {
        bool m = false;
        double val = 0;
        int c = 0, r = 1;
        while (((c = Console.Read()) < '0' || c > '9') && c != '-') { }
        val = (c >= '0' && c <= '9') ? c - 48 : (c == '-' ? m = true : m = false) ? 0 : 0;
        while ((c = Console.Read()) >= '0' && c <= '9') val = val * 10 + (m ? -(c - 48) : (c - 48));
        if (c == '.') while ((c = Console.Read()) >= '0' && c <= '9') { val += ((double)(c - 48)) / (r *= 10); }

        return val;
    }

    static long readLong()
    {
        long val = 0;
        bool m = false;
        int c;
        while (((c = Console.Read()) < '0' || c > '9') && c != '-') { }
        val = (c >= '0' && c <= '9') ? c - 48 : (c == '-' ? m = true : m = false) ? 0 : 0;
        while ((c = Console.Read() - 48) >= 0 && c <= 9) val = val * 10 + (m ? -c : c);
        return val;
    }

    static int readInt()
    {
        bool m = false;
        int val = 0, c;
        while (((c = Console.Read()) < '0' || c > '9') && c != '-') { }
        val = (c >= '0' && c <= '9') ? c - 48 : (c == '-' ? m = true : m = false) ? 0 : 0;
        while ((c = Console.Read() - 48) >= 0 && c <= 9) val = val * 10 + (m ? -c : c);
        return val;
    }
}

using System;

namespace B.Borze
{
    public class Program
    {

        public static void Main(string[] args)
        {

            var num = Console.ReadLine();
            var res = "";
            for(int i = 0; i < num.Length; i++)
            {
                if(num[i]=='-' && num[i + 1] == '-')
                {
                    res += '2';
                    i++;
                }
                else if(num[i]=='-' && num[i + 1] == '.')
                {
                    res += '1';
                    i++;
                }
                else if (num[i] == '.')
                {
                    res += '0';
                }
            }
            Console.WriteLine(res);

        }
    }
}

using System;
using System.Linq;

namespace _32_B_Borze
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            for (int i = 0; i < s.Length; i++)
            {
                if(s[i] == '.')
                {
                    Console.Write('0');
                }
                else if (s[i] == '-' && s[i+1] == '.')
                {
                    Console.Write('1');
                    i += 1;
                }
                else if (s[i] == '-' && s[i + 1] == '-')
                {
                    Console.Write('2');
                    i += 1;
                }
            }

        }
    }
}

using System;
using System.Linq;

namespace _32_B_Borze
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string output = "";

            string z = ".";
            string o = "-.";
            string t = "--";
            string z0 = "0";
            string o1 = "1";
            string t2= "2";

            for (int i = 0; i <= s.Length-1; i++)
            {
                if(s[i].ToString() != z)
                {
                    if ((s[i].ToString()+s[i+1]) == o && (s[i].ToString() + s[i + 1]) != t  )
                    {
                        output = output+o1;
                        i = i + 1;
                    }
                    else
                    {
                        output = output + t2;
                        i = i + 1;
                    }
                }
                else
                {
                    output = output + z0;
                }
            }
            Console.WriteLine(output);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForceProblemSolve
{
    class Borze32B
    {
        public static void Main()
        {
            String s = Console.ReadLine();
            string r = "";

            for (int i = 0; i < s.Length;i++)
            {
                if(s[i].Equals('.'))
                {
                    r = r + "0";
                }
                else if ((s[i] + "" + s[i+1]).Equals( "-."))
                {
                    r = r + "1";
                    i++;
                }
                else if ((s[i] + "" + s[i + 1]).Equals("--"))
                {
                    r = r + "2";
                    i++;
                }
            }

            Console.WriteLine(r);
        }
    }
}

using System;
using System.Text;

namespace _32B._Borze
{
    class Program
    {
        static void Main(string[] args)
        {
            string code = Console.ReadLine();
            int symbolIndex = 0;
            StringBuilder decryptedCode = new StringBuilder();

            while (symbolIndex != code.Length)
            {
                if (code[symbolIndex] == '.')
                {
                    symbolIndex++;
                    decryptedCode.Append('0');
                }
                else if (code[symbolIndex] == '-')
                {
                    symbolIndex++;
                    if (code[symbolIndex] == '.')
                    {
                        symbolIndex++;
                        decryptedCode.Append('1');
                    }
                    else
                    {
                        symbolIndex++;
                        decryptedCode.Append('2');
                    }
                }
            }

            Console.WriteLine(decryptedCode.ToString());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace _32
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            //s(input);
            int p = 0;
            if (!Regex.IsMatch(input, @"^[\.-]+$"))
                return;
            while (p < input.Length)
            {
                if (input[p] == '-' && p + 1 < input.Length && input[p + 1] == '-')
                {
                    Console.Write(2);
                    p += 2;
                }
                else if (input[p] == '-' && p + 1 < input.Length && input[p + 1] == '.')
                {
                    Console.Write(1);
                    p += 2;
                }
                else if (input[p] == '.')
                {
                    Console.Write(0);
                    p++;
                }
            }
        }

        static string s(string input)
        {
            int p = 0;
            string output = "";
            if(!Regex.IsMatch(input,@"^[\.-]+$"))
                return null;
            while (p < input.Length)
            {
                if (input[p] == '-' && p +1 < input.Length && input[p + 1] == '-')
                {
                    Console.Write(2);
                    output += 2;
                    p += 2;
                }
                else if (input[p] == '-' && p + 1 < input.Length && input[p + 1] == '.')
                {
                    Console.Write(1);
                    output+=1;
                    p += 2;
                }
                else if (input[p] == '.')
                {
                    Console.Write(0);
                    output += 0;
                    p++;
                }
            }

            return output;
        }

    }
}

using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Console.ReadLine().Replace("--", "2").Replace("-.", "1").Replace(".", "0"));
        }
    }
}
/* Sat Oct 10 2020 16:26:13 GMT+0300 (Москва, стандартное время) */

using System;
using System.Collections.Generic;
using System.Linq;

namespace Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();

            string result = string.Empty;
            for (int i = 0; i < input.Length;)
            {
                if (input[i] == '.')
                {
                    result += '0';
                    i += 1;
                }
                else
                {
                    if (input[i + 1] == '.')
                    {
                        result += '1';
                    }
                    else
                    {
                        result += '2';
                    }

                    i += 2;
                }
            }

            Console.WriteLine(result);
        }

        private static T GetInput<T>(Func<string, T> convertor)
        {
            return convertor(Console.ReadLine());
        }

        private static IEnumerable<T> GetInputs<T>(Func<string, T> convertor, params char[] splitter)
        {
            return Console.ReadLine().Split(splitter).Select(x => convertor(x));
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForces
{
	class B
	{
		static void Main(string[] args)
		{
		   char[] arr  = Console.ReadLine().ToCharArray();
		   string ans = "";
		   int c=0;
		   while(c<arr.Length)
		   {
		      if(arr[c]=='-')
		      {
		         if(arr[c+1]=='-')
		         {
		            ans += "2";
		            c += 2;
		         }else if(arr[c+1]=='.'){
		            ans += "1";
		            c += 2;
		         }
		      }else{
		         ans += "0";
		         c++;
		      }
		   }

		   for(int i=0;i<ans.Length;i++)
		   {
		      Console.Write(ans[i]);
		   }
		}

	}
}

using System;

namespace D3Problem1
{
    class Program
    {
        static void Main(string[] args)
        {
            string value = "";
            string input = Console.ReadLine();
            for(int i = 0; i < input.Length; i++)
            {
                if (input[i] == '.')
                    value += 0;
                // Console.Write(value);
                if (input[i] == '-')
                {
                    if (input[i + 1] == '.')
                        value += 1;
                    if (input[i + 1] == '-')
                        value += 2;
                    i++;
                }
            }
            Console.Write(value);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
           string s=Console.ReadLine();
           for(int i=0;i<s.Length;i++){
                if(s[i]=='.')Console.Write(0);
                else if(s[i]=='-' &&s[i+1]=='.'){
                  Console.Write(1);
                  i++;
                 }
                else if(s[i]=='-' &&s[i+1]=='-')
                    {Console.Write(2);i++;}
            }
        }
    }
}

using System;

namespace Codejam
{
    class Problem
    {
        public static void Main(String[] args)
        {
            string input = Console.ReadLine();
            int i = 0;string ret = "";
            while (i < input.Length)
            {
                if (input[i] == '.')
                    ret += "0";
                else if (input[i] == '-' && input[i+1]=='.')
                { ret += "1";
                    i++;
                }
                else if (input[i] == '-' && input[i + 1] == '-')
                { ret += "2";
                    i++;
                }
                i++;
            }
            Console.WriteLine(ret);
        }
    }
}

using System;
using System.Text;

namespace ConsoleApp1
{
    internal class Program
    {
        private static void Main(string[] args)
        {

            string input = Console.ReadLine();
            int i = 0;
            StringBuilder sb = new StringBuilder();
            while(i<input.Length)
            {
                if (input[i] == '.')
                {
                    sb.Append("0");
                    i++;
                }
                else if (input[i] == '-' && input[i + 1] == '.')
                {
                    sb.Append("1");

                    i += 2;
                }
                else if (input[i] == '-' && input[i + 1] == '-')
                {
                    sb.Append("2");

                    i += 2;
                }
            }
            Console.WriteLine(sb.ToString());
         //      Console.ReadKey();
            return;

        }
    }
}

namespace Codeforces {
    using System;

    class Problem32B {

        private const string ZeroDigit = ".";
        private const string OneDigit = "-.";

        private class BorzeReader {

            private readonly string _stringToRead;
            private int _currentIndex = 0;

            public BorzeReader(string inputString) {
                _stringToRead = inputString;
            }

            public string GetNextDigit() {
                if (_currentIndex >= _stringToRead.Length) {
                    return string.Empty;
                }
                string result = _stringToRead.Substring(_currentIndex, 1);
                if (result == ZeroDigit) {
                    _currentIndex++;
                }
                else {
                    result = _stringToRead.Substring(_currentIndex, 2);
                    _currentIndex += 2;
                }
                return result;
            }

        }

        private static string GetTernaryDigit(string borzeDigit) {
            return borzeDigit == ZeroDigit ? "0" : (borzeDigit == OneDigit ? "1" : "2");
        }

        private static string ConvertToTernaryNotation(string borzeNotation) {
            var borzeReader = new BorzeReader(borzeNotation);
            string result = string.Empty;
            while (true) {
                string borzeDigit = borzeReader.GetNextDigit();
                if (borzeDigit == string.Empty) {
                    return result;
                }
                result += GetTernaryDigit(borzeDigit);
            }
        }

        static void Main()
        {
            string inputString = Console.In.ReadLine();
            string result = ConvertToTernaryNotation(inputString);
            Console.Out.WriteLine(result);
            Console.In.ReadLine();
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace Contest
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder s=new StringBuilder( Console.ReadLine());
            string kq = "";
            while (s.Length > 0)
            {
                if (s.Length>=2&&"" + s[0] + s[1] == "-.") { s.Replace("-.", "", 0, 2);
                    kq += "1"; }
                else if (s.Length>=2&&"" + s[0] + s[1] == "..")
                {
                    s.Replace(".", "", 0, 1);
                    kq += "0";
                }
                else if (s.Length>=2&&"" + s[0] + s[1] == "--")
                {
                    s.Replace("--", "", 0, 2);
                    kq += "2";
                }
                else if ("" + s[0] == ".")
                {
                    s.Replace(".", "", 0, 1);
                    kq += "0";
                }
            }
            Console.WriteLine(kq);
        }
    }
}

// Problem: 32B - Borze
// Author: Gusztav Szmolik

using System;

class Borze
    {
    static int Main ()
        {
        string line = Console.ReadLine ();
        if (line == null)
            return -1;
        char[] delims = {' ', '\t'};
        string[] words = line.Split (delims,StringSplitOptions.RemoveEmptyEntries);
        if (words.Length != 1)
            return -1;
        string code = words[0];
        if (code.Length > 200)
            return -1;
        bool inDigit = false;
        foreach (char c in code)
            {
            if (c == '.')
                {
                if (inDigit)
                    {
                    Console.Write (1);
                    inDigit = false;
                    }
                else
                    Console.Write (0);
                }
            else if (c == '-')
                {
                if (inDigit)
                    {
                    Console.Write (2);
                    inDigit = false;
                    }
                else
                    inDigit = true;
                }
            }
        if (inDigit)
            return -1;
        Console.WriteLine ();
        return 0;
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace cf
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            s = s.Replace("--", "2");
            s = s.Replace("-.", "1");
            s = s.Replace(".", "0");
            Console.WriteLine(s);
        }
    }
}

using System;

namespace B32
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Console.ReadLine().Replace("--", "2").Replace("-.", "1").Replace(".", "0"));
        }
    }
}

using System;

   class Program
    {
        static void Main(string[] args)
        {

            int zero = 0;
            int one = 1;
            int two = 2;

            string input = Console.ReadLine();

            char[] chars = input.ToCharArray();

            int index =0;
            while(index < chars.Length)
            {

              if(chars[index]=='-' && chars[index+1]=='.')
                {
                    Console.Write(one);
                    ++index;

                }

              else if(chars[index]=='-'&& chars[index+1]=='-')
                {
                    Console.Write(two);
                    ++index;

                }

                else if (chars[index] == '.')
                {
                    Console.Write(zero);
                }

                ++index;

            }

            Console.WriteLine();
        }

    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Activities
{
    class Program
    {
        static void Main(string[] args)
        {
            string borzeCode = Console.ReadLine();

            for (int x = 0; x < borzeCode.Length;)
            {
                if (borzeCode[x] == '.')
                {
                    Console.Write("0");
                    x++;
                }

                else if ((borzeCode[x] == '-') && (borzeCode[x + 1] == '.'))
                {
                    Console.Write("1");
                    x += 2;
                }

                else if ((borzeCode[x] == '-') && (borzeCode[x + 1] == '-'))
                {
                    Console.Write("2");
                    x += 2;
                }
            }

            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Xml.Xsl;
using StringBuilder = System.Text.StringBuilder;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			//string input3 = Console.ReadLine();
			//string input4 = Console.ReadLine();

			//var inputs1 = input1.Split(new[] {' ', '}', '{', ','}, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs3 = input3.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs4 = input4.Split(new[] { ' ', '}', '{', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();

			var builder = new StringBuilder();

			char? previous = input1.ElementAt(0);
			for (int i = 1; i < input1.Length; i++)
			{
				if (previous == null)
				{
					previous = input1.ElementAt(i);
					continue;
				}

				var current = input1.ElementAt(i);
				if (current == '.')
				{
					if (previous == '.')
					{
						builder.Append("0");
					}
					else
					{
						builder.Append("1");
						previous = null;
					}
				}
				else
				{
					if (previous == '.')
					{
						builder.Append("0");
						previous = current;
					}
					else
					{
						builder.Append("2");
						previous = null;
					}
				}
			}

			if (previous != null)
			{
				builder.Append("0");
			}

			Console.WriteLine(builder.ToString());
		}

		public class Team
		{
			public string Name { get; set; }

			public int Points { get; set; }

			public int GoalsFor { get; set; }

			public int GoalsAgainst { get; set; }
		}

		static long Factorial(long a)
		{
			return a > 1 ? a * Factorial(a - 1) : 1;
		}
	}
}

using System;
using System.Linq;
using System.Text;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder z = new StringBuilder();
            char[] a = Console.ReadLine().ToCharArray();
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i]=='.')
                {
                    z.Append(0);
                }
                if (a[i]=='-')
                {
                    if (a[i + 1] == '-')
                    {
                        z.Append(2);
                        a[i + 1] = 'p';
                    }
                    else if (a[i + 1] == '.')
                    {
                        z.Append(1);
                        a[i + 1] = 'p';
                    }
                }
            }
            Console.WriteLine(z);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
            string v="",s=Console.ReadLine();
            for(int i=0;i<s.Length;i++){
                if(s[i]=='.')v+="0";
                else if(s[i]=='-'&&s[i+1]=='-'){v+="2";i++;}
                else {v+="1";i++;}
    }
    Console.WriteLine(v);
        }

        }
    }

using System;
using System.Collections.Generic;
using System.Text;

namespace C0deforces
{
    class Borze
    {
        static void Main(string[] args)
        {
            char[] input = Console.ReadLine().Trim().ToCharArray();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < input.Length; i++)
            {
                switch(input[i])
                {
                    case '.':
                        sb.Append(0);
                        break;
                    case '-':
                        if (input[++i] == '.') { sb.Append(1); }
                        else { sb.Append(2); }
                        break;
                }
            }
            Console.WriteLine(sb.ToString());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication41
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string ans = null;
            for (int i = 0; i < s.Length-1; i++)
            {

                if (s[i] == '-' && s[i+1] =='-' )
                {
                    ans += 2;i++;
                }
                else if (s[i] == '-' && s[i+1]=='.')
                {
                    ans += 1;i++;
                }
                else if (s[i] == '.')
                {
                    ans += 0;

                }
            }
            Console.WriteLine(ans);
                    }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            for (int i = 0; i < a.Length-1; i++)
            {
                if (a[i] == '-' && a[i + 1] == '.')
                {
                    Console.Write("1");
                    i++;
                }
                if (a[i] == '-' && a[i + 1] == '-')
                {
                    Console.Write("2");
                    i++;
                }
                if (a[i] == '.' && a[i + 1] == '.')
                {
                    Console.Write("0");
                }
            }
            if (a[a.Length - 1] == '.')
            {
                Console.Write("0");
            }

        }
    }
}

using System;

namespace ConsoleApplication16
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            string str = Console.ReadLine();

            char[] charArray = str.ToCharArray();

            string str1 = "";
            char f = ' ';

            if (charArray[0] == '-' && charArray[1] == '-')
            {
                str1 += '2';

                for (int i = 2; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                        f = ' ';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }
            else if (charArray[0] == '-' && charArray[1] == '.')
            {
                str1 += '1';

                for (int i = 2; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                        f = ' ';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }
            else
            {
                for (int i = 0; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }

            Console.WriteLine(str1);
                    }
    }
}

using System;

namespace ConsoleApplication16
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            string str = Console.ReadLine();

            char[] charArray = str.ToCharArray();

            string str1 = "";
            char f = ' ';

            if (charArray[0] == '-' && charArray[1] == '-')
            {
                str1 += '2';

                for (int i = 2; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }
            else if (charArray[0] == '-' && charArray[1] == '.')
            {
                str1 += '1';

                for (int i = 2; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }
            else
            {
                for (int i = 0; i < charArray.Length; i++)
                {
                    if (charArray[i] == '.' && f == ' ')
                    {
                        str1 += '0';
                    }
                    else if (f == '-' && charArray[i] == '.')
                    {
                        str1 += '1';
                    }
                    else if (f == '-' && charArray[i] == '-')
                    {
                        str1 += '2';
                        f = ' ';
                    }
                    else if (charArray[i] == '-')
                    {
                        f = '-';
                    }
                }
            }

            Console.WriteLine(str1);

        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http.Headers;
using System.Runtime.CompilerServices;
using System.Text;

namespace BorzeDecode
{
    class Program
    {
        static void Main(string[] args)
        {
            var res = Method(Console.ReadLine());
            Console.WriteLine(res);
        }

        public static string Method(string input)
        {
            var code = new List<char>();
            for (int i = 0; i < input.Length - 1; i++)
            {
                if (input[i] == '-')
                {
                    if (input[i + 1] == '-') code.Add('2');
                    else code.Add('1');
                    i += 1;
                    continue;
                }
                else code.Add('0');
            }
            return new string(code.ToArray());
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Snail
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int c = 0;
            for(int i=0; i<s.Length; i++)
            {
                if (s[i] == '.')
                {
                    Console.Write(c);
                    c = 0;
                }
                else c++;
            }
            Console.WriteLine(c);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace CP
{
    class Program
    {
        static void Main(string [] main)
        {
            string s = Console.ReadLine();
            StringBuilder result = new StringBuilder();
            for(int i = 0 ; i<s.Length - 1; i++)
            {
                if(s[i]=='.')
                result.Append("0");
                else
                {
                    if(s[i] == '-')
                    {
                        if(s[i+1] == '.')
                        result.Append("1");
                        else
                        {
                            result.Append("2");
                        }
                    }
                }
            }
            Console.WriteLine(result);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace CP
{
    class Program
    {
        static void Main(string [] main)
        {
            string s = Console.ReadLine();
            StringBuilder result = new StringBuilder();
            for(int i = 0 ; i<s.Length - 1; i++)
            {
                if(s[i]=='.')
                result.Append("0");
                else
                {
                    if(s[i] == '-')
                    {
                        if(s[i+1] == '.')
                        {
                            result.Append("1");
                            i++;
                        }
                        else
                        {
                            result.Append("2");
                            if(i!=s.Length - 2)
                            i++;
                        }
                    }
                }
                if(i == s.Length - 2)
                result.Append("0");
            }
            Console.WriteLine(result);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace CP
{
    class Program
    {
        static void Main(string [] main)
        {
            string s = Console.ReadLine();
            StringBuilder result = new StringBuilder();
            for(int i = 0 ; i<s.Length - 1; i++)
            {
                if(s[i]=='.')
                result.Append("0");
                else
                {
                    if(s[i] == '-')
                    {
                        if(s[i+1] == '.')
                        result.Append("1");
                        else
                        {
                            result.Append("2");
                        }
                    }
                }
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace CP
{
    class Program
    {
        static void Main(string [] main)
        {
            string s = Console.ReadLine();
            StringBuilder result = new StringBuilder();
            for(int i = 0 ; i<s.Length - 1; i++)
            {
                if(s[i]=='.')
                result.Append("0");
                else
                {
                    if(s[i] == '-')
                    {
                        if(s[i+1] == '.')
                        {
                            result.Append("1");
                            i++;
                        }
                        else
                        {
                            result.Append("2");
                            i++;
                        }
                    }
                }
            }
            Console.WriteLine(result);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace CP
{
    class Program
    {
        static void Main(string [] main)
        {
            string s = Console.ReadLine();
            StringBuilder result = new StringBuilder();
            for(int i = 0 ; i<s.Length - 1; i++)
            {
                if(s[i]=='.')
                result.Append("0");
                else
                {
                    if(s[i] == '-')
                    {
                        if(s[i+1] == '.')
                        {
                            result.Append("1");
                            if(i!=s.Length - 2)
                            i++;
                        }
                        else
                        {
                            result.Append("2");
                                                        if(i!=s.Length - 2)

                            i++;
                        }
                    }
                }
            }
            Console.WriteLine(result);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
             //int n=int.Parse(Console.ReadLine());
             string a=Console.ReadLine();
             for(int i=0;i<a.Length-1;i++)
             {
                  if(a[i]=='.')
                  Console.Write(0);
                  if((a[i]=='-')&&(a[i+1]=='.'))
                  {
                  Console.Write(1);
                  i++;
                  }
                  if((a[i]=='-')&&(a[i+1]=='-'))
                  {
                  Console.Write(2);
                  i++;
                  }
             }

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.Borze
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            var data = input.Split('.');
            int[] array = new int[1000];
            for (int i = 0; i < data.Length; i++)
            {
                array[i] = data[i].Length;
            }
            for (int i = 0; i < data.Length; i++)
            {
                Console.Write(array[i]);
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeForceProblemSolve
{
    class Borze32B
    {
        public static void Main()
        {
            String s = Console.ReadLine();
            String r = "";
            for (int i = 0; i < s.Length-1; i++)
            {
                if((s[i]+"").Equals("."))
                {
                    r = r + '0';
                }
                else if ((s[i] + "" + s[i+1]).Equals( "-."))
                {
                    r = r + '1';
                    i++;
                }
                else if ((s[i] + "" + s[i + 1]).Equals("--"))
                {
                    r = r + '2';
                    i++;
                }
            }

            Console.WriteLine(r);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
           string s=Console.ReadLine();
           for(int i=0;i<s.Length;i++){
                if(s[i]=='.')Console.WriteLine(0);
                else if(s[i]=='-' &&s[i+1]=='.'){
                  Console.WriteLine(1);
                  i++;
                 }
                else if(s[i]=='-' &&s[i+1]=='-')
                    {Console.WriteLine(2);i++;}
            }
        }
    }
}