#region imports
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

#endregion

namespace CodeForces
{
    class Problem
    {
        const bool IsContest = true;

        private void Solve()
        {
            var h = _.NextInt();

            var n = Convert.ToString(_.NextLong() - 1, 2).PadLeft(h, '0').ToCharArray();

            //            var level = 0;
            long nVisited = 0;
            var nextDir = 0;
            const long long1 = 1;
            for (var level = 0; level < h; level++)
            {
                var dir = n[level];

                if (level == h - 1)
                {
                    switch (dir)
                    {
                        case '1':
                            nVisited += nextDir == 1 ? 1 : 2;
                            break;
                        case '0':
                            nVisited += nextDir == 1 ? 2 : 1;
                            break;
                        default:
                            Debug.Assert(false);
                            break;
                    }
                }
                else
                {
                    switch (dir)
                    {
                        case '1':
                            nVisited += long1 << (h - level);
                            nextDir = 0;
                            break;
                        case '0':
                            nVisited += 1;
                            nextDir = 1                                ;
                            break;
                        default:
                            Debug.Assert(false);
                            break;
                    }
                }
            }
            _.WriteLine(nVisited);
        }

        #region shit
        private readonly InOut _ = new InOut(IsContest);
        static void Main(string[] args)
        {
            var p = new Problem();
            p.Solve();
            p._.Close();
        }
    }
    class InOut
    {
        private const string InputFile = "input.txt";
        private const string OutputFile = "output.txt";
        public StreamWriter Cout { get; private set; }
        public StreamReader Cin { get; private set; }
        private void SetConsoleIo()
        {
            Cin = new StreamReader(new BufferedStream(Console.OpenStandardInput()));
            Cout = new StreamWriter(new BufferedStream(Console.OpenStandardOutput()));
        }
        private void SetFileIo(string inputFile, string outputFile) { Cin = new StreamReader(inputFile); Cout = new StreamWriter(outputFile); }
        public InOut() { SetConsoleIo(); }
        public InOut(string inputFile, string outputFile) { SetFileIo(inputFile, outputFile); }
        public InOut(bool isContest) { if (isContest) SetConsoleIo(); else SetFileIo(InputFile, OutputFile); }
        public void WriteLine(object x) { Cout.WriteLine(x); }
        public void Close() { Cin.Close(); Cout.Close(); }
        public void WriteLine(string format, params object[] args) { Cout.WriteLine(format, args); }
        private int _pos;
        private string[] _tokens;

        private string[] NextStringArray() { return Cin.ReadLine().Split(" \t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); }
        public string NextToken()
        {
            while (_tokens == null || _pos == _tokens.Length)
            {
                // ReSharper disable once PossibleNullReferenceException
                _tokens = NextStringArray();
                _pos = 0;
            }
            return _tokens[_pos++];
        }
        public int NextInt() { return int.Parse(NextToken()); }
        public long NextLong() { return long.Parse(NextToken()); }
        public double NextDouble() { return double.Parse(NextToken(), CultureInfo.InvariantCulture); }
        public int[] NextIntArray() { return NextStringArray().Select(int.Parse).ToArray(); }
        public byte[] NextByteArray() { return NextStringArray().Select(byte.Parse).ToArray(); }
        public long[] NextLongArray() { return NextStringArray().Select(long.Parse).ToArray(); }
        #endregion
    }
}


От JohnKEA, контест: Codeforces Alpha Round #21 (Codeforces format), задача: (A) Jabber ID, Полное решение, #

using System;
using System.Text.RegularExpressions;
namespace _21A
{
    class Program
    {
        static void Main(string[] args)
        {
            var str = Console.ReadLine();
            if (Regex.IsMatch(str, @"^\w{1,16}@\w{1,16}(\.\w{1,16})*(/\w{1,16})?$"))
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }
    }
}


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

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

      CommandManager cm = new CommandManager();
      int[] boardValues = Array.ConvertAll(Console.ReadLine().Split(' '), s => Int32.Parse(s));
      int[] paintOne = Array.ConvertAll(Console.ReadLine().Split(' '), s => Int32.Parse(s));
      int[] paintTwo = Array.ConvertAll(Console.ReadLine().Split(' '), s => Int32.Parse(s));

      int boardMax = boardValues[0] > boardValues[1] ? boardValues[0] : boardValues[1];
      int boardMin = boardValues[0] < boardValues[1] ? boardValues[0] : boardValues[1];

      int[] allValues = new int[4] {paintOne[0], paintOne[1], paintTwo[0], paintTwo[1] }.OrderBy(x => x).ToArray();

      if(boardMax >= (allValues[3] + allValues[0]) && (boardMin * 2) >= allValues[1] + allValues[2]) {
        Console.WriteLine("YES");
      } else if((boardMax - allValues[3]) == 0 && (boardMin * 2) >= allValues[1] + allValues[2] + allValues[0]) {
        Console.WriteLine("YES");
      } else {
        Console.WriteLine("NO");
      }
    }
  }
}


/*
Author : Shivakkumar K R
File name : 313_Div2_ProbB.cs
*/
using System;
using System.Collections;
using System.Linq;
using System.Text;
using System.IO;
public class _313_Div2_ProbB {
	static int max(int a, int b)
	{
		return Math.Max(a, b);
	}
	static void swap<T>(ref T a, ref T b) {
		T c = b;
		a = b;
		b = c;
	}
	static void Main(string [] args) {
		Console.SetIn(new StreamReader(File.OpenRead("C://Users//Shiva//Desktop//313_Div2_ProbB.txt")));
		var input = Console.ReadLine().Split(new char[] {});
		int a1 = int.Parse(input[0]), b1 = int.Parse(input[1]);
		input = Console.ReadLine().Split(new char[] {});
		int a2 = int.Parse(input[0]), b2 = int.Parse(input[1]);
		input = Console.ReadLine().Split(new char[] {});
		int a3 = int.Parse(input[0]), b3 = int.Parse(input[1]);

		for (int i = 0; i < 4; i++) {
			if ((a1 >= (a2 + a3) && b1 >= b2 && b1 >= b3) || (b1 >= (b3 + b3) && a1 >= a2 && a1 >= a3)) {
				Console.WriteLine("YES"); return;
			}
			if (i % 2 == 0) swap(ref a2,ref a3);
			swap(ref b2,ref b3);
		}

		Console.WriteLine("NO");
	}
}


/*
 * Created by SharpDevelop.
 * Handle: Arcos
 */
using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;

namespace TestingStuff
{
	class Program
	{
		public static void Main(string[] args)
		{
			var a1 = Console.ReadLine().Split(' ');
			List<int> arr = new List<int>();
			foreach (var st in a1){arr.Add(int.Parse(st));}
			var n = int.Parse(a1[0]); // known airports
			var k = int.Parse(a1[1]); // airport unique id by his house
			List<int> brr = new List<int>();
			brr.Add(1);
			for (int i = 0; i < n; i++){
				rec(ref brr);
			}
			Console.WriteLine(brr[k - 1]);
			return;
		}

		public static void rec(ref List<int> arr){
			List<int> brr = new List<int>();
			brr.AddRange(arr);
			brr.Add(arr[arr.Count() / 2] + 1);
			brr.AddRange(arr);
			arr = brr;
		}
	}
}


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

namespace B
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string[] strArr = a.Split(' ');
            int n = Int32.Parse(strArr[0]), k = Int32.Parse(strArr[1]);
            int[] mas = {1};
            int[] masTwo;
            for (int i =0; i < n; i++)
            {
                masTwo = new int[mas.Length * 2 + 1];
                mas.CopyTo(masTwo, 0);
                masTwo[mas.Length] = i + 2;
                mas.CopyTo(masTwo, mas.Length + 1);
                mas = masTwo;
            }
            Console.WriteLine(mas[k-1]);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Collections;
using System.Globalization;
using System.IO;
using System.Linq;
//Гавно код недорешенный
public class Source
{
    public void Program()
    {
    }
    void Read()
    {
        int n = ri(), a = ri() - 1;
        List<int> l = new List<int>();
        l.Add(1);
        int num = 2;
        for (int i = 0; i < n; i++)
        {
            int size = l.Count();
            l.Add(num++);
            for (int j = 0; j < size; j++)
            {
                l.Add(l[j]);
            }
        }
        writeLine(l[a]);
    }

    #region hide it
    #region Main

    protected static TextReader reader;
    protected 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("input.txt");
            //writer = new StreamWriter("output.txt");
#endif
        var source = new Source();
        source.Read();
        source.Program();

        /* try
         {
             new Source().Program();
         }
         catch (Exception ex)
         {
 #if DEBUG
             Console.WriteLine(ex);
 #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); }
    public static string ReadToken()
    {
        while (currentLineTokens.Count == 0)
            currentLineTokens = new Queue<string>(ReadAndSplitLine());
        return currentLineTokens.Dequeue();
    }
    public static int ri() { return int.Parse(ReadToken()); }
    public static char ReadChar() { return char.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static ulong ReaduLong() { return ulong.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(i => int.Parse(i)).ToArray(); }
    public static char[] ReadCharArray() { return ReadAndSplitLine().Select(i => char.Parse(i)).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(i => long.Parse(i)).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 char[][] ReadCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadCharArray(); 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 write<T>(T value) { writer.Write(value); }
    public static void writeLine<T>(T value) { writer.WriteLine(value); }
    public static void writeArray<T>(T[] array, string split) { for (int i = 0; i < array.Length; i++) { write(array[i] + split); } }
    public static void writeMatrix<T>(T[][] matrix, string split) { for (int i = 0; i < matrix.Length; i++) { writeArray(matrix[i], split); writer.Write("\n"); } }
    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

    #region Methods
    #region DSU
    public void MakeSet(int[] poi)
    {
        for (int i = 0; i < poi.Length; i++)
        {
            poi[i] = i;
        }
    }
    public int Find(int x, int[] poi)
    {
        if (poi[x] == x) return x;
        return poi[x] = Find(poi[x], poi);
    }
    Random rand = new Random();
    public void Unite(int x, int y, int[] poi)
    {
        y = Find(y, poi);
        x = Find(x, poi);
        if (rand.Next() % 2 == 0)
            Swap(ref x, ref y);
        poi[x] = y;
    }
    #endregion

    class Deque<T>
    {
        T[] array;
        int start, length;
        public Deque()
        {
            start = 0; length = 0; array = new T[1];
        }
        public T this[int index] { get { return array[(start + index) % array.Length]; } set { array[(start + index) % array.Length] = value; } }
        int last { get { return (start + length) % array.Length; } }
        /// <summary>
        /// ÃÆÃ¢â¬ËÃâÃÂÃÆÃ¢â¬ËÃÂ¢Ã¢âÂ¬Ã
        /// </summary>
        public T PeekFirst()
        {
            return array[start];
        }
        public int Count { get { return length; } }
        /// <summary>
        /// ÃÆÃÂÃâÃÂºÃÆÃÂÃâÃÂ¾ÃÆÃÂÃâÃÂ½ÃÆÃÂÃâÃÂµÃÆÃ¢â¬ËÃÂ¢Ã¢âÂ¬  ÃÆÃÂÃâÃÂ±ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ· ÃÆÃ¢â¬ËÃâ Ã¢â¬â¢ÃÆÃÂÃâÃÂ´ÃÆÃÂÃâÃÂ°ÃÆÃÂÃâÃÂ»ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ½ÃÆÃÂÃâÃÂ¸ÃÆÃ¢â¬ËÃâÃÂ
        /// </summary>
        public T PeekLsat()
        {
            return array[last];
        }
        public T PopLast()
        {
            if (length == 0)
                throw new IndexOutOfRangeException("OutOfRange");
            length--;
            return array[last];
        }
        public T PopFirst()
        {
            if (length == 0)
                throw new IndexOutOfRangeException("OutOfRange");
            length--;
            if (start >= array.Length - 1) start = 0; else start++;
            return array[start - 1 < 0 ? array.Length - 1 : start - 1];
        }
        public void AddFirst(T value)
        {
            IncreaseAndInspection();
            if (start <= 0) start = array.Length - 1; else start--;
            array[start] = value;
            length++;
        }
        public void AddLast(T value)
        {
            IncreaseAndInspection();
            array[last] = value;
            length++;
        }
        bool overflow { get { return length == array.Length; } }
        void IncreaseAndInspection()
        {
            if (overflow)
                increase();

        }
        void increase()
        {
            T[] array2 = new T[array.Length * 2];
            for (int i = 0; i < array.Length; i++)
            {
                int pos = (start + i) % array.Length;
                array2[i] = array[pos];
            }
            array = array2;
            start = 0;
            array2 = null;
        }
        public void Clear()
        {
            start = 0; length = 0; array = new T[1];
        }
    }
    class Heap<T>
    {
        Comparison<T> ic;
        List<T> storage = new List<T>();
        public Heap(Comparison<T> ic)
        {
            this.ic = ic;
        }
        public void Add(T element)
        {
            storage.Add(element);
            int pos = storage.Count - 1;
            while (pos != 0 && ic(storage[((int)(pos - 1) >> 1)], element) > 0)
            {
                Swap(storage, pos, ((int)(pos - 1) / 2));
                pos = ((int)(pos - 1) / 2);
            }
        }
        public T Pop()
        {
            T t = storage[0];
            Swap(storage, 0, storage.Count - 1);
            int pos = 0;
            storage.RemoveAt(storage.Count - 1);
            if (Count > 0)
                while (true)
                {
                    T my = storage[pos];
                    if (pos * 2 + 1 >= Count)
                        break;
                    T left = storage[pos * 2 + 1];
                    if (pos * 2 + 2 >= Count)
                    {
                        if (ic(left, my) < 0)
                        {
                            Swap(storage, pos, pos * 2 + 1);
                            pos = pos * 2 + 1;
                        }
                        break;
                    }
                    T right = storage[pos * 2 + 2];
                    if (ic(left, my) < 0 || ic(right, my) < 0)
                    {
                        if (ic(left, right) < 0)
                        {
                            Swap(storage, pos, pos * 2 + 1);
                            pos = pos * 2 + 1;
                        }
                        else
                        {

                            Swap(storage, pos, pos * 2 + 2);
                            pos = pos * 2 + 2;
                        }
                    }
                    else break;
                }
            return t;
        }

        public void Clear()
        {
            storage.Clear();
        }
        /// <summary>
        /// ÃÆÃÂÃâÃÂ±ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ· ÃÆÃ¢â¬ËÃâ Ã¢â¬â¢ÃÆÃÂÃâÃÂ´ÃÆÃÂÃâÃÂ°ÃÆÃÂÃâÃÂ»ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ½ÃÆÃÂÃâÃÂ¸ÃÆÃ¢â¬ËÃâÃÂ
        /// </summary>
        /// <returns></returns>
        public T Peek()
        {
            return storage[0];
        }
        public int Count
        {
            get { return storage.Count; }
        }
        //void RemoveLast, Size, peeklast, add
    }
    static void Swap<T>(ref T lhs, ref T rhs)
    {
        T temp;
        temp = lhs;
        lhs = rhs;
        rhs = temp;
    }
    static void Swap<T>(T[] a, int l, int r)
    {
        T temp;
        temp = a[l];
        a[l] = a[r];
        a[r] = temp;
    }
    static void Swap<T>(List<T> a, int l, int r)
    {
        T temp;
        temp = a[l];
        a[l] = a[r];
        a[r] = temp;
    }

    bool outregion(long y, long x, long n, long m)
    {
        if (x < 0 || x >= m || y < 0 || y >= n)
            return true;
        return false;
    }
    static void initlist<T>(ref List<T>[] list, int n)
    {
        list = new List<T>[n];
        for (int i = 0; i < n; i++)
            list[i] = new List<T>();
    }
    static void newarray<T>(ref T[][] array, int n, int m)
    {
        array = new T[n][];
        for (int i = 0; i < n; i++)
            array[i] = new T[m];
    }
    static void newarray<T>(ref T[] array, int n)
    {
        array = new T[n];
    }
    static void fill<T>(T[] array, T value)
    {
        for (int i = 0; i < array.Length; i++)
            array[i] = value;
    }
    static void fill<T>(T[][] array, T value)
    {
        for (int i = 0; i < array.Length; i++)
            for (int j = 0; j < array[i].Length; j++)
                array[i][j] = value;
    }
    public bool NextPermutation<T>(T[] b, Comparison<T> ic)
    {
        for (int j = b.Length - 2; j >= 0; j--)
        {
            if (ic(b[j], b[j + 1]) < 0)
            {
                for (int l = b.Length - 1; l >= 0; l--)
                {
                    if (ic(b[l], b[j]) > 0)
                    {
                        Swap(b, j, l);
                        Array.Reverse(b, j + 1, b.Length - (j + 1));
                        return true;
                    }
                }
            }
        }
        return false;
    }
    int[,] step8 = new int[,]
    {
        {-1,0 },
        {1,0 },
        {0,-1 },
        {0,1 },
        {1,1 },
        {-1,1 },
        {-1,-1 },
        {1,-1 },
    };
    int[,] step4 = new int[,]
    {
        {-1,0 },
        {1,0 },
        {0,-1 },
        {0,1 },
    };
    struct Vector2
    {
        public double x;
        public double y;
        public Vector2(double x, double y)
        {
            this.x = x;
            this.y = y;
        }
        public double Dist(Vector2 to)
        {
            return Math.Sqrt(Math.Abs(Math.Pow(to.x - x, 2)) + Math.Abs(Math.Pow(to.y - y, 2)));
        }
        public static bool operator ==(Vector2 left, Vector2 right) { return left.x == right.x && left.y == right.y; }
        public static bool operator !=(Vector2 left, Vector2 right) { return left.x != right.x || left.y != right.y; }
    }
    #endregion
    #endregion

}


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

class Program
{
    static void Main(string[] args)
    {
        int n = RI();
        long k = RL();

        int l = 1;
        for (int i = 2; i <= n; i++) l = l + l + 1;

        while (k != (l / 2) + 1)
        {
            if (k > l / 2) k -= ((l / 2) + 1);

            l /= 2;
            n--;
        }

        Console.Write(n);
    }

    private const int Mod = 1000000000 + 7;

    #region Data Read
    private static char ReadSign()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans == '+' || ans == '-' || ans == '?')
                return (char)ans;
        }
    }

    private static long GCD(long a, long b)
    {
        if (a % b == 0) return b;
        return GCD(b, a % b);
    }

    private static List<int>[] ReadGraph(int n, int m)
    {
        List<int>[] g = new List<int>[n];
        for (int i = 0; i < g.Length; i++) g[i] = new List<int>();
        for (int i = 0; i < m; i++)
        {
            int a = RI() - 1;
            int b = RI() - 1;

            g[a].Add(b);
            g[b].Add(a);
        }

        return g;
    }

    private static int[,] ReadGraphAsMatrix(int n, int m)
    {
        int[,] matrix = new int[n + 1, n + 1];
        for (int i = 0; i < m; i++)
        {
            int a = RI();
            int b = RI();
            matrix[a, b] = matrix[b, a] = 1;
        }

        return matrix;
    }

    private static void Sort(ref int a, ref int b)
    {
        if (a > b) Swap(ref a, ref b);
    }

    private static void Swap(ref int a, ref int b)
    {
        int tmp = a;
        a = b;
        b = tmp;
    }

    private const int BufferSize = 1 << 16;
    private static StreamReader consoleReader;
    private static MemoryStream testData;

    private static int RI()
    {
        int ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static ulong RUL()
    {
        ulong ans = 0;
        int chr;
        do
        {
            chr = consoleReader.Read();
            if (chr == -1)
                return 0;
        } while (chr < '0' || chr > '9');

        ans = (uint)(chr - '0');
        while (true)
        {
            chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans;
            ans = ans * 10 + (uint)(chr - '0');
        }
    }

    private static long RL()
    {
        long ans = 0;
        int mul = 1;
        do
        {
            ans = consoleReader.Read();
            if (ans == -1)
                return 0;
            if (ans == '-') mul = -1;
        } while (ans < '0' || ans > '9');

        ans -= '0';
        while (true)
        {
            int chr = consoleReader.Read();
            if (chr < '0' || chr > '9')
                return ans * mul;
            ans = ans * 10 + chr - '0';
        }
    }

    private static int[] RIA(int n)
    {
        int[] ans = new int[n];
        for (int i = 0; i < n; i++)
            ans[i] = RI();
        return ans;
    }

    private static long[] RLA(int n)
    {
        long[] ans = new long[n];
        for (int i = 0; i < n; i++)
            ans[i] = RL();
        return ans;
    }

    private static char[] ReadWord()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        List<char> s = new List<char>();
        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s.ToArray();
    }

    private static char[] ReadString(int n)
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));

        char[] s = new char[n];
        int pos = 0;
        do
        {
            s[pos++] = (char)ans;
            if (pos == n) break;
            ans = consoleReader.Read();
        } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));

        return s;
    }

    private static char[] ReadStringLine()
    {
        int ans;

        do
        {
            ans = consoleReader.Read();
        } while (ans == 10 || ans == 13);

        List<char> s = new List<char>();

        do
        {
            s.Add((char)ans);
            ans = consoleReader.Read();
        } while (ans != 10 && ans != 13 && ans != -1);

        return s.ToArray();
    }

    private static char ReadLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'))
                return (char)ans;
        }
    }
    private static char ReadNonLetter()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')))
                return (char)ans;
        }
    }

    private static char ReadAnyOf(IEnumerable<char> allowed)
    {
        while (true)
        {
            char ans = (char)consoleReader.Read();
            if (allowed.Contains(ans))
                return ans;
        }
    }

    private static char ReadDigit()
    {
        while (true)
        {
            int ans = consoleReader.Read();
            if (ans >= '0' && ans <= '9')
                return (char)ans;
        }
    }

    private static int ReadDigitInt()
    {
        return ReadDigit() - (int)'0';
    }

    private static char ReadAnyChar()
    {
        return (char)consoleReader.Read();
    }

    private static string DoubleToString(double x)
    {
        return x.ToString(CultureInfo.InvariantCulture);
    }

    private static double DoubleFromString(string x)
    {
        return double.Parse(x, CultureInfo.InvariantCulture);
    }

    static Program()
    {
        //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);
    }

    private static void PushTestData(StringBuilder sb)
    {
        PushTestData(sb.ToString());
    }
    private static void PushTestData(string data)
    {
#if TOLYAN_TEST
        if (testData == null)
        {
            testData = new MemoryStream();
            consoleReader = new StreamReader(testData);
        }

        var pos = testData.Position;
        var bytes = Encoding.UTF8.GetBytes(data);
        testData.Write(bytes, 0, bytes.Length);
        testData.Flush();
        testData.Position = pos;
#endif
    }
    #endregion
}


using System;
using System.Collections.Generic;
using System.Linq;
namespace makethemequal
{
    class Program
    {
        static void Main(string[] args)
        {
           string s=Console.ReadLine();
           int As=s.Count(c=>c=='a');
           if(As*2>=s.Count){
               Console.WriteLine(s.Count);
               return;
           }
           Console.WriteLine(As*2-1);
        }
    }
}


using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
			int count =0, rem = 0;
			for(int i = 0; i < s.Length; i++)
			{
				if(s[i] == 'a')
				{
					count++;
				}
			}
			if(count > s.length/2)
			{
				Console.WriteLine(s.Length);
			}
			else
			{
				rem = s.Length - count;
				rem = rem - count;
				Console.WriteLine(rem);
			}
        }
    }
}


using System;
using System.Linq;
namespace Challenge
{
    class Program
    {
        static void Main()
        {
            Console.Write(LoveA(Console.ReadLine()));
		}
		public static string LoveA(string str)
        {

            int count_a = str.Count(x => x == 'a');
            int count_other = str.Length - count_a;
            if (count_a == 0 && count_other == 0)
                return "1";
            else if (count_a == 0 && count_other > 0)
                return (count_other + count_other + 1).ToString();
            else if (count_a > count_other)
                return str.Length.ToString();
            else if (count_a == count_other)
                return (str.Length - 1).ToString();
            else if (count_a < count_other)
                return (count_a + count_a - 1).ToString();

        }

	}
}


using System;
using System.Collections.Generic;

class Program
{
    private static void Main(string[] args)
    {
        int inputNumber = Int32.Parse(Console.ReadLine());
        List<int> findedNumbers = new List<int>();

        for (int i = 10; i < inputNumber; i++)
        {
            char[] parsedInputNumber = i.ToString().ToCharArray();

            int firstDigit = Int32.Parse(parsedInputNumber[0].ToString());
            int secondDigit = Int32.Parse(parsedInputNumber[1].ToString());
            int thirdDigit = 0;

            if (i > 99)
            {
                thirdDigit = Int32.Parse(parsedInputNumber[2].ToString());
            }

            int currentVariant = i + firstDigit + secondDigit + thirdDigit;

            if (currentVariant == inputNumber)
            {
                findedNumbers.Add(i);
            }
        }

        Console.WriteLine(findedNumbers.Count);

        if (findedNumbers.Count > 0)
        {
            foreach (int findedNumber in findedNumbers)
            {
                Console.WriteLine(findedNumber);
            }
        }
        Console.ReadKey();
    }
}


using System;
using System.Collections.Generic;

namespace cf328b
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			char[] nums = Console.ReadLine().ToCharArray();;
			char[] digits = Console.ReadLine().ToCharArray();
			List<char> sn = new List<char>();

			List<char> sd = new List<char>();

			foreach (var num in nums) {
				if (num == '2' || num == '5')
					sn.Add('2');

				if (num == '6' || num == '9')
					sn.Add('6');
			}

			foreach (var num in digits) {
				if (num == '2' || num == '5')
					sd.Add('2');

				if (num == '6' || num == '9')
					sd.Add('6');
			}

			sn.Sort();
			sd.Sort();

			bool failed = false;
			int res = 0;
			do
			{
				foreach (var c in sn) {
					int i = sd.BinarySearch(c);
					if (i >= 0)
					{
						sd[i] = 'z';
						sd.Sort();
					}
					else failed = true;
				}
				if (!failed)
					res++;
			}while (!failed);

			Console.WriteLine(res);
		}
	}
}


#define Online

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.IO;
using System.Numerics;

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    partial class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            D();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {
            StringBuilder sb = new StringBuilder();
            string str = ReadLine();
            for (int i = 0; i < str.Length; i++)
            {
                if (!str[i].Equals('a') && !str[i].Equals('A')
                    && !str[i].Equals('o') && !str[i].Equals('O')
                    && !str[i].Equals('y') && !str[i].Equals('Y')
                    && !str[i].Equals('e') && !str[i].Equals('E')
                    && !str[i].Equals('u') && !str[i].Equals('U')
                    && !str[i].Equals('i') && !str[i].Equals('I'))
                {
                    sb.Append('.');
                    if (str[i] < 97)
                        sb.Append(char.ToLower(str[i]));
                    else
                        sb.Append(str[i]);

                }
            }
            Console.WriteLine(sb);
        }

        static void B()
        {
            int n = ReadInt();
            int[,] ans = new int[2 * n + 1, 2 * n + 1];
            for (int i = 0; i < 2 * n + 1; i++)
            {
                int z = (i > n ? n - (i - n) : i);
                ans[i, n] = z;
                for (int j = 0; j < n; j++)
                {
                    ans[i, n - j - 1] = z - j - 1;
                    ans[i, n + j + 1] = z - j - 1;
                }
            }
            for (int i = 0; i < 2 * n + 1; i++)
            {
                int j = 0;
                while (j < 2 * n + 1 && ans[i, j] < 0)
                {
                    Console.Write("  ");
                    j++;
                }
                Console.Write(ans[i, j++]);
                while (j < 2 * n + 1 && ans[i, j] >= 0)
                {
                    Console.Write(" " + ans[i, j]);
                    j++;
                }

                Console.WriteLine();
            }
        }

        static void C()
        {

        }

        static void D()
        {
            int n1, n2, k1, k2;
            ReadArray(' ');
            n1 = NextInt();
            n2 = NextInt();
            k1 = NextInt();
            k2 = NextInt();
            long[,] p = new long[n1, n1 + 1];
            long[,] h = new long[n2, n2 + 1];
            for (int i = 1; i <= k1 && i <= n1; i++)
                p[0, i] = 1;
            for (int i = 1; i <= k2 && i <= n2; i++)
                h[0, i] = 1;
            for (int i = 1; i < n1; i++)
            {
                for (int j = 1; j <= k1; j++)
                {
                    for (int z = 1; z <= n1; z++)
                    {
                        if (z + j <= n1)
                            p[i, z + j] += p[i - 1, z];
                    }
                }
            }
            for (int i = 1; i < n2; i++)
            {
                for (int j = 1; j <= k2; j++)
                {
                    for (int z = 1; z <= n2; z++)
                    {
                        if (z + j <= n2)
                            h[i, z + j] += h[i - 1, z];
                    }
                }
            }
            long sum = 0;
            for (int i = 0; i < n1; i++)
            {
                if (i < n2)
                    sum += p[i, n1] * h[i, n2] * 2;
                if (i + 1 < n2)
                    sum += p[i, n1] * h[i + 1, n2];
                if (i - 1 >= 0)
                    sum += p[i, n1] * h[i - 1, n2];
                sum %= 100000000L;
            }
            Console.WriteLine(sum);
        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

    }

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }

    partial class Program
    {
        static string[] tokens;
        static int cur_token = 0;

        static void ReadArray(char sep)
        {
            cur_token = 0;
            tokens = Console.ReadLine().Split(sep);
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int NextInt()
        {
            return int.Parse(tokens[cur_token++]);
        }

        static long NextLong()
        {
            return long.Parse(tokens[cur_token++]);
        }

        static double NextDouble()
        {
            return double.Parse(tokens[cur_token++]);
        }

        static decimal NextDecimal()
        {
            return decimal.Parse(tokens[cur_token++]);
        }

        static string NextToken()
        {
            return tokens[cur_token++];
        }

        static string ReadLine()
        {
            return Console.ReadLine();
        }
    }
}


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

namespace ConsoleApplication5
{
    class Program
    {
        static int result = 0;
        static int k1, k2;
        static Dictionary<State, int> res;
        static void Main(string[] args)
        {
            int[] v = Console.ReadLine().Split(' ').Select(z => int.Parse(z)).ToArray();
            int n1 = v[0];
            int n2 = v[1];
            k1 = v[2];
            k2 = v[3];
            res = new Dictionary<State, int>();
            int bCnt, wCnt;
            wCnt = n1;
            bCnt = n2;

            Console.WriteLine(S(new State() { N1 = n1, N2 = n2, WCurCnt = 0, BCurCnt = 0 }));
        }

        static int S(State state)
        {
            if (state.N1 == 0 && state.N2 == 0)
            {
                return 1;
            }
            if (res.ContainsKey(state))
            {
                return res[state];
            }
            int s1 = 0, s2 = 0;
            if (state.N1 > 0 && state.WCurCnt < k1)
            {
                s1 = S(
                    new State()
                    {
                        N1 = state.N1 - 1,
                        N2 = state.N2,
                        WCurCnt = state.WCurCnt + 1,
                        BCurCnt = 0
                    });
            }
            if (state.N2 > 0 && state.BCurCnt < k2)
            {
                s2 = S(
                    new State()
                    {
                        N1 = state.N1,
                        N2 = state.N2 - 1,
                        WCurCnt = 0,
                        BCurCnt = state.BCurCnt + 1
                    });
            }
            res.Add(state, s1 + s2);
            return s1 + s2;
        }

        struct State : IEquatable<State>
        {
            public int N1 { get; set; }
            public int N2 { get; set; }
            public int WCurCnt { get; set; }
            public int BCurCnt { get; set; }

            public override int GetHashCode()
            {
                return string.Format("{0}{1}{2}{3}", N1, N2, WCurCnt, BCurCnt).GetHashCode();
            }

            public override bool Equals(object obj)
            {
                return Equals((State)obj);
            }

            public bool Equals(State other)
            {
                return N1 == other.N1
                    && N2 == other.N2
                    && WCurCnt == other.WCurCnt
                    && BCurCnt == WCurCnt;
            }
        }
    }
}


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

namespace work01
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			var n = Int32.Parse (Console.ReadLine ());

			var l1 = n > 4 ? (n + 1) / 3 : n > 0 ? 1 : 0;
			var l2 = n > 4 ? n / 3 : n > 1 ? 1 : 0;
			var l3 = n > 2 ? 1 : 0;
			var l4 = n > 4 ? (n - 1) / 3 : n > 3 ? 1 : 0;

			Func <int, int, string> print = (k, m) => {
				var sb = new StringBuilder();
				for (var i = 1; i <= m; i++) {
					sb.AppendFormat("{0}.", (i <= k) ? "0" : "#" );
				}
				return sb.ToString();
			};

			Console.WriteLine("+------------------------+");
			Console.WriteLine("|{0}|D|)", print(l1, 11));
			Console.WriteLine("|{0}|.|", print(l2, 11));
			Console.WriteLine("|{0}......................|", print(l3, 1));
			Console.WriteLine("|{0}|.|)", print(l4, 11));
			Console.Write("+------------------------+");
		}
	}
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int k = int.Parse(Console.ReadLine());
            int t = k;
            string s1 = "+------------------------+";
            string s2 = "|O.......................|";
            string s3 = "|#.......................|";
            string[,] mat = new string[3,11];
            k--;
            mat[0, 0] = "|";
            mat[1, 0] = "|";
            mat[2, 0] = "|";
            for (int i = 0; i < 11; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    if (k > 0)
                    { mat[j, i] += "O"; k--; }
                    else
                        mat[j, i] += "#";
                }
            }
            Console.WriteLine(s1);
            for (int i = 0; i < 3; i++)
            {
                if (i == 2)
                Console.WriteLine((t>3)?s2:s3);
                for (int j = 0; j < 11; j++)
                {
                    Console.Write(mat[i, j] + ".");
                }
                if (i == 0)
                    Console.Write("|D|)");
                else
                    if (i == 2)
                        Console.Write("|.|)");
                else
                        Console.Write("|.|");
                Console.WriteLine();
            }
            Console.WriteLine(s1);
        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            /*  int k = Convert.ToInt32(Console.ReadLine());
              char[,] mas = new char[4, 11];

              for (int i = 0; i < 4; i++)
              {
                  for (int j = 0; j < 11; j++)
                      mas[i, j] = '#';

              }
              for (int i = 1; i < 11; i++)
                  mas[2, i] = '.';

              for (int i = 0; i < 4; i++)
                  for (int j = 0; j < 11;j++ )
                      if (k > 0 && mas[i, j] != '.')
                      { k--; mas[i, j] = '0'; }

              Console.WriteLine("+------------------------+");
              Console.Write('|');
              for (int i = 0; i < 11;i++ )
                  Console.Write(mas[0,i].ToString() +'.');
              Console.WriteLine("|D|)");

              Console.Write('|');
              for (int i = 0; i < 11; i++)
                  Console.Write(mas[0, i].ToString() + '.');
              Console.WriteLine("|.|)");

              Console.Write('|');
              for (int i = 0; i < 11; i++)
                  Console.Write(mas[0, i].ToString() + '.');
              Console.WriteLine("..|)");

              Console.Write('|');
              for (int i = 0; i < 11; i++)
                  Console.Write(mas[0, i].ToString() + '.');
              Console.WriteLine("|.|)");

                  Console.WriteLine("+------------------------+");*/

            int k = Convert.ToInt32(Console.ReadLine());
            if (k < 5)
            {
                Console.WriteLine("+------------------------+");
                if (k > 0) { Console.WriteLine("|O.#.#.#.#.#.#.#.#.#.#.|D|)"); k--; }
                else Console.WriteLine("|#.#.#.#.#.#.#.#.#.#.#.|D|)");
                if (k > 0) { Console.WriteLine("|O.#.#.#.#.#.#.#.#.#.#.|.|)"); k--; }
                else Console.WriteLine("|#.#.#.#.#.#.#.#.#.#.#.|.|)");
                if (k > 0) { Console.WriteLine("|O.......................|)"); k--; }
                else Console.WriteLine("|#.......................|)");
                if (k > 0) { Console.WriteLine("|O.#.#.#.#.#.#.#.#.#.#.|.|)"); k--; }
                else Console.WriteLine("|#.#.#.#.#.#.#.#.#.#.#.|.|)");
                Console.WriteLine("+------------------------+");
                return;
            }
            k = k - 4;
            Console.WriteLine("+------------------------+");
            for (int i = 0; i < 2; i++)
            {
                Console.Write("|O.");
                for (int j = 0; j < 10; j++)
                {
                    if (3 * j + i < k) Console.Write("O.");
                    else Console.Write("#.");
                }
                if (i == 0) Console.Write("|D|)");
                else Console.Write("|.|");
                Console.WriteLine();
            }
            Console.WriteLine("|O.......................|");

            Console.Write("|O.");
            for (int i = 0; i < 10; i++)
                if (3 * i + 2 < k) Console.Write("O.");
                else Console.Write("#.");
            Console.Write("|.|)");
            Console.WriteLine();
            Console.WriteLine("+------------------------+");
        }
    }
}


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

namespace Cola
{
    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)
        {
            int n = Next(), a = Next(), b = Next(), c = Next();

            int count = 0;
            for (int aa = 0; aa < a; aa += 2)
            {
                for (int cc = 0; cc <= c; cc++)
                {
                    int bb = n - aa/2 - 2*cc;
                    if (bb >= 0 && bb <= b)
                        count++;
                }
            }

            writer.WriteLine(count);
            writer.Flush();
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}


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

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

            String s = Console.ReadLine();

            char[] c = {' '};

            String[] a = s.Split(c, 3, StringSplitOptions.RemoveEmptyEntries);

            long x = long.Parse(a[0]), tx = x;
            long y = long.Parse(a[1]), ty = y;
            long m = long.Parse(a[2]);

            long ans = 0;

            while (tx < m && ty < m){

                if (tx < ty){

                    ans += ((ty - tx) / ty + 1);

                    tx = tx + ty * ((ty - tx) / ty + 1);

                }
                else {

                    ans += ((tx - ty) / tx + 1);

                    ty = ty + tx * ((tx - ty) / tx + 1);

                }

                if (Math.Abs(tx - m) >= Math.Abs(x - m) && Math.Abs(ty - m) >= Math.Abs(y - m)){

                    ans = -1;

                    break;

                }

            }

            Console.WriteLine(ans);

        }
    }
}


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

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

            String s = Console.ReadLine();

            char[] c = {' '};

            String[] a = s.Split(c, 3, StringSplitOptions.RemoveEmptyEntries);

            long x = long.Parse(a[0]), tx = x;
            long y = long.Parse(a[1]), ty = y;
            long m = long.Parse(a[2]);

            long ans = 0;

            while (tx < m && ty < m){

                if (tx < ty){

                    if (ty != 0){

                        ans += ((ty - tx) / ty + 1);

                        tx = tx + ty * ((ty - tx) / ty + 1);

                    }
                    else {

                        ans = -1;

                        break;

                    }

                }
                else {

                    if (tx != 0){

                        ans += ((tx - ty) / tx + 1);

                        ty = ty + tx * ((tx - ty) / tx + 1);

                    }
                    else {

                        ans = -1;

                        break;

                    }

                }

                if (Math.Abs(tx - m) >= Math.Abs(x - m) && Math.Abs(ty - m) >= Math.Abs(y - m)){

                    ans = -1;

                    break;

                }

            }

            Console.WriteLine(ans);

        }
    }
}


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

namespace Contest_63
{
    class Program
    {
        class mem : IComparable
        {
            public int i;
            public int p;
            //public string name;

            public mem(int i, int p)
            {
                this.i = i; this.p = p;
            }

            public int CompareTo(Object k)
            {
                var a = (mem)k;
                if (this.p != a.p)
                    return this.p.CompareTo(a.p);
                return this.i.CompareTo(a.i);
            }
        }

        static void A()
        {
            int n = int.Parse(Console.ReadLine());

            SortedList<mem, string> m = new SortedList<mem, string>();

            for (int i = 0; i < n; i++)
            {
                var t = Console.ReadLine().Split(' ');
                int p = 0;
                switch (t[1])
                {
                    case "rat":
                        p = 1;
                        break;
                    case "child":
                        case "woman":
                        p = 2;
                        break;
                    case "man":
                        p = 3;
                        break;
                    case "captain":
                        p = 4;
                        break;
                }

                m.Add(new mem(i, p), t[0]);
            }

            foreach (var e in m)
                Console.WriteLine(e.Value);
        }

        static void B()
        {
            var t = Console.ReadLine().Split(' ');
            int n = int.Parse(t[0]);
            int m = int.Parse(t[1]);

            SortedDictionary<int, int> d = new SortedDictionary<int, int>();
            for (int i = 1; i <= m; i++)
                d.Add(i,0);

            t = Console.ReadLine().Split(' ');

            foreach (var s in t)
            {
                int k = int.Parse(s);
                d[k]++;
            }

            int l = 0;
            for (; d[m] != n; l++)
            {
                for (int j = m-1; j > 0; j--)
                {
                    if (d[j] > 0)
                    {
                        d[j + 1]++;
                        d[j]--;
                    }
                }
            }
            Console.WriteLine(l);
        }

        static bool check(string s1, string s2, int x, int y)
        {
            int kx = 0;
            int ky = 0;

            for (int i = 0; i < 4; i++)
                if (s1[i] == s2[i])
                    kx++;
            if (kx != x)
                return false;
            ky = s1.Intersect(s2).Count();
            if (ky - kx != y)
                return false;
            return true;
        }

        static void C()
        {
            var l = new List<string>();
            int[] a = new int[4];
            for (a[0] = 0; a[0] < 9; a[0]++)
                for (a[1] = 1; a[1] < 9; a[1]++)
                    for (a[2] = 2; a[2] < 9; a[2]++)
                        for (a[3] = 3; a[3] < 9; a[3]++)
                        {
                            string s = "" + a[0] + a[1] + a[2] + a[3];
                            if (!((a[0] == a[1]) || (a[0] == a[2]) || (a[0] == a[3]) || (a[1] == a[2]) || (a[1] == a[3]) || (a[2] == a[3])))
                                l.Add(s);
                        }

            int n = int.Parse(Console.ReadLine());

            for (int i = 0; i < n; i++)
            {
                var t = Console.ReadLine().Split(' ');
                string b = t[0];
                int x = int.Parse(t[1]);
                int y = int.Parse(t[2]);
                for (int k = 0;k < l.Count; k++)
                {
                    if (!check(l[k], b, x, y))
                    {
                        l.Remove(l[k]);
                        k--;
                    }
                }
            }

            if (l.Count > 1)
                Console.WriteLine("Need more data");
            if (l.Count == 0)
                Console.WriteLine("Incorrect data");
            if (l.Count == 1)
                Console.WriteLine(l[0]);
        }

        static void Main(string[] args)
        {
            C();
        }
    }
}


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

namespace InnaAndPony
{
    class Program
    {

        static void Main(string[] args)
        {
            string[] nmihab = Console.ReadLine().Split(' ');
            int n = Convert.ToInt32(nmihab[0]);
            int m = Convert.ToInt32(nmihab[1]);
            int i = Convert.ToInt32(nmihab[2]);
            int j = Convert.ToInt32(nmihab[3]);
            int a = Convert.ToInt32(nmihab[4]);
            int b = Convert.ToInt32(nmihab[5]);

            if ((((Math.Abs(1 - i) / a) % 2 != (Math.Abs(1 - j) / b) % 2)) && (((Math.Abs(n - i) / a) % 2 != (Math.Abs(1 - j) / b) % 2)) && (((Math.Abs(n - i) / a) % 2 != (Math.Abs(m - j) / b) % 2)) && (((Math.Abs(1 - i) / a) % 2 != (Math.Abs(m - j) / b) % 2)))
            {
                Console.WriteLine("Poor Inna and pony!");
            }
            else
            {
                if (Math.Abs(i - 1) % a == 0)
                    k1 = Math.Abs(i - 1) / a;
                if ((Math.Abs(j - 1) % b == 0) && (Math.Abs(j - 1) / b > k1))
                    k1 = Math.Abs(j - 1) / b;
                if (Math.Abs(i - n) % a == 0)
                    k2 = Math.Abs(i - n) / a;
                if ((Math.Abs(j - 1) % b == 0) && (Math.Abs(j - 1) / b > k2))
                    k2 = Math.Abs(j - 1) / b;
                if (Math.Abs(i - n) % a == 0)
                    k3 = Math.Abs(i - n) / a;
                if ((Math.Abs(j - m) % b == 0) && (Math.Abs(j - m) / b > k3))
                    k3 = Math.Abs(j - m) / b;
                if (Math.Abs(i - 1) % a == 0)
                    k4 = Math.Abs(i - 1) / a;
                if ((Math.Abs(j - m) % b == 0) && (Math.Abs(j - m) / b > k4))
                    k4 = Math.Abs(j - m) / b;
                int k = Math.Max(Math.Max(k1, k2), Math.Max(k3, k4));
                Console.WriteLine(k);
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
    class Program
    {
        public static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int n,m,i,j,a,b;
            n = int.Parse(s[0]);
            m = int.Parse(s[1]);
            i = int.Parse(s[2]);
            j = int.Parse(s[3]);
            a = int.Parse(s[4]);
            b = int.Parse(s[5]);
            int[,] distances=new int[4,2];
            distances[0,0]=i-1;
            distances[0,1]=j-1;
            distances[1,0]=i-1;
            distances[1,1]=m-j;
            distances[2,0]=n-i;
            distances[2,1]=j-1;
            distances[3,0]=n-1;
            distances[3,1]=m-j;
            int[] results=new int[4];
            if ((i == 1 && b == 1) || (i == n && j == 1) || (i == n & j == m) || (i == 1 && j == m))
            {
                Console.WriteLine(0);
                return;
            }
            for (int k = 0; k < 4; k++)
            {
                if (distances[k, 0] % a == 0 && distances[k, 1] % b == 0 && distances[k, 0] / a == distances[k, 1] / b)
                {
                    results[k] = distances[k, 0] / a;
                }
                else
                {
                    results[k] = -1;
                }
            }
            int min = -1;
            for (int k = 0; k < 4; k++)
            {
                if (results[k] < min || min < 0)
                {
                    min = results[k];
                }
            }
            if (min == -1)
            {
                Console.WriteLine("Poor Inna and pony!");
            }
            else
            {
                Console.WriteLine(min);
            }
        }


using System; using System.Linq;

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var vp = int.Parse(Console.ReadLine());
    var vd = int.Parse(Console.ReadLine());
    var latency = double.Parse(Console.ReadLine());
    var f = int.Parse(Console.ReadLine());
    var c = int.Parse(Console.ReadLine());

    if (vp >= vd) { Console.Write(0); return; }
    var dv = 1.0*vd - vp;

    var advantage = 0.0000000001;
    var drugs = 0;
    while (advantage < c) {
      var t = advantage / dv;
      if (advantage + t*vp >= c) break;

      t = 2*t + f;
      drugs++;
      advantage += t * vp;
    }
    Console.Write(drugs);
  }
}


int m = c * p;
                int n = m / (d - p);
                int di = n * d;
                if(di<dic)
                {
                    int i = di / p;
                    c = i + f + (di / d);
                    opp++;
                }
                else
                {
                    break;
                }


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

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

            int opp = 0;
            int p = int.Parse(Console.ReadLine());
            int d = int.Parse(Console.ReadLine());
            int c = int.Parse(Console.ReadLine());
            int f = int.Parse(Console.ReadLine());
            int dic = int.Parse(Console.ReadLine());

            while (true)
            {
                int m = c * p;
                int n = m / (d - p);
                int di = n * d;
                if(di<dic)
                {
                    int i = di / p;
                    c = i + f + (di / d);
                    opp++;
                }
                else
                {
                    break;
                }

            }

            Console.WriteLine(opp);
        }
    }
}


using System;
class Program
    {
        public static void Main(string[] args)
        {
            int a, b;
            {
                string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
                a = int.Parse(input[0]);
                b = int.Parse(input[1]);
            }
            {
                int temp;
                List<int> data = new List<int>();
                data.Add(b);
                while (a < b)
                {
                    if ((temp = b % 10) == 1)
                        b = (b -= 1) / 10;
                    else if (temp % 2 == 0)
                        b /= 2;
                    else break;
                    data.Add(b);
                }
                if (a!=b) Console.WriteLine("NO");
                else
                {
                    Console.WriteLine("YES\n{0}", data.Count);
                    for (int i = data.Count - 1; i > 0; --i)
                        Console.Write("{0} ", data[i]);
                    Console.WriteLine(data[0]);
                }
            }
        }
    }


using System;
using System.Linq;

namespace TaskA
{
    class Program
    {
        private static readonly int[] stack = new int[50];
        private static int a;
        private static int b;

        private static int AtoB(int step)
        {
            if (a > b) return 0;
            stack[step] = a;
            if (a == b) return step;
            var temp = a;
            a = a * 10 + 1;
            var result = AtoB(step + 1);
            if (result > 0) return result;
            a = temp * 2;
            result = AtoB(step + 1);
            if (result > 0) return result;
            return 0;
        }

        static void Main()
        {
            var ab = Console.ReadLine().Split(' ').ToArray();
            a = int.Parse(ab[0]);
            b = int.Parse(ab[1]);
            var result = AtoB(0);
            if (result>0)
            {
                Console.WriteLine("YES");
                Console.WriteLine(result+1);
                for(var i=0;i<=result;i++)
                    Console.Write("{0} ", stack[i]);
            }
            else Console.WriteLine("NO");
        }
    }
}


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

namespace Olmp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //x * 2 | x + '1'
            int from, to;
            string[] split = null;
            do
            {
                split = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            } while ((split.Length < 2) || !int.TryParse(split[0], out from) || !int.TryParse(split[1], out to));
            List<int> step = new List<int>();
            List<int> steps = new List<int>();
            step.Add(to);
            while (to != from)
            {
                if (to.ToString().Last() == '1')
                {
                    to = Convert.ToInt32(to.ToString().Remove(to.ToString().Length - 1));
                    step.Add(to);
                }
                else if (Math.IEEERemainder((double)to, 2) == 0)
                {
                    to = to / 2;
                    step.Add(to);
                }
                else
                {
                    Console.WriteLine("NO");
                    break;
                }
            }
            if (to == from)
            {
                Console.WriteLine("YES");
                Console.WriteLine(step.Count);
                for (int i = step.Count-1; i >=0; i--)
                {
                    if (i != 0)
                    {
                        Console.Write(step[i] + " ");
                    }
                    else
                    {
                        Console.Write(step[i]);
                    }
                }
            }
           // Console.ReadKey();
        }
    }
}


using Common;
using System;
using System.IO;
using System.Linq;

namespace Codeforces.R342.C
{
    public static class Solver
    {
        public static void Main()
        {
            using (var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false })
            {
                Solve(Console.In, sw);
            }
        }

        public static void Solve(TextReader tr, TextWriter tw)
        {
            WriteAnswer(tw, Parse(tr));
        }

        private static void WriteAnswer(TextWriter tw, long answer)
        {
            tw.WriteLine(answer);
        }

        private static long Parse(TextReader tr)
        {
            var a = tr.ReadLine().Split().Select(x => long.Parse(x)).ToArray();
            return Calc(a[0], a[1]);
        }

        private static long Calc(long r, long h)
        {
            var n = h / r * 2;

            var s = h % r;

            if (s * 2 < r)
                ++n;
            else if (s * 2 >= r)
                n += 2;
            else if (s * 2 * 2 * s >= r * r * 3)
                n += 3;

            return n;
        }
    }
}


using System;

class P {
    static void Main() {
        int n = 8;
        var rows = Console.In.ReadToEnd().Split('\n');
        var count = 0;
        for (int i = 0; i < n; i++) {
            var cnt = n;
            for (int j = 0; j < n; j++) {
                if (rows[i][j] == 'B') { cnt--; }
            }
            if (cnt == 0) { count++; }
        }

        for (int i = 0; i < n; i++) {
            var cnt = n;
            for (int j = 0; j < n; j++) {
                if (rows[j][i] == 'B') { cnt--; }
            }
            if (cnt == 0) { count++; }
        }
        if (count == 16) count == 8;
        Console.WriteLine(count);
    }
}


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

namespace diee_role
{
    class Program
    {
        static void Main(string[] args)
        {
            double y = double.Parse(Console.ReadLine()); double w = double.Parse(Console.ReadLine());
            double sum ;
            try
            {

                sum = w / y;

            }
            catch(Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                Console.WriteLine("{0} / {1}",w,y);
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.Remoting;
using System.Text;
using System.Xml.Schema;

namespace Contest
{
    class Scanner
    {
        private string[] line = new string[0];
        private int index = 0;

        public string Next()
        {
            if (line.Length <= index)
            {
                line = Console.ReadLine().Split(' ');
                index = 0;
            }

            var res = line[index];
            index++;
            return res;
        }

        public int NextInt()
        {
            return int.Parse(Next());
        }

        public long NextLong()
        {
            return long.Parse(Next());
        }

        public ulong NextUlong()
        {
            return ulong.Parse(Next());
        }

        public string[] Array()
        {
            line = Console.ReadLine().Split(' ');
            index = line.Length;
            return line;
        }

        public int[] IntArray()
        {
            var array = Array();
            var result = new int[array.Length];
            for (int i = 0; i < array.Length; i++)
            {
                result[i] = int.Parse(array[i]);
            }

            return result;
        }

        public long[] LongArray()
        {
            var array = Array();
            var result = new long[array.Length];
            for (int i = 0; i < array.Length; i++)
            {
                result[i] = long.Parse(array[i]);
            }

            return result;
        }
    }

    class Program
    {
        private long B;
        private void Scan()
        {
            var sc = new Scanner();
            B = sc.NextLong();
        }

        public void Solve()
        {
            Scan();
            long ans = 1;
            for (int i = 2; i * i <= B; i++)
            {
                if (B % i == 0)
                {
                    int cnt = 0;
                    while (B % i == 0)
                    {
                        cnt++;
                        B /= i;
                    }

                    ans *= (cnt + 1);
                }
            }

            if (B != 1)
            {
                ans *= 2;
            }

            Console.WriteLine(ans);
        }
        static void Main() => new Program().Solve();
    }
}


using System;
using System.Collections.Generic;
class Program
{
	static void Main(string[] args)
	{
		long N = long.Parse(Console.ReadLine());
		List<long> list = new List<long>();
		list = enum_div(N);
		Console.WriteLine(list.Count);
	}

	public static List<long> enum_div(long n){
		long tmp = n;
		var list = new List<long>();
		for(var i=1;i*i<=n;i++){
			if(n%i==0){
				list.Add(i);
				if(i*i!=n){
					list.Add(n-i);
				}
			}
		}
		return list;
	}
}


using System;
using System.Collections.Generic;
class Program
{
	static void Main(string[] args)
	{
		long N = long.Parse(Console.ReadLine());
		long ans = 0;
		long N2 = (long)Math.Pow(N,0.6)+1;
		for(var i=1;i<=N2;i++){
			if(N%i==0){
			    if(i*i<=N){
    			    ans += 1;
	    			if(i*i!=N){
		    			ans += 1;
			    	}
			    }
			}
		}
		Console.WriteLine(ans);
	}
}


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

namespace ProjectEuler
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());

            int counter = 2;
            for (int i = 2; i <= n/2 ; i++)
            {
                if (n%i == 0)
                {

                    counter++;
                }
            }

            Console.WriteLine(counter);
        }
    }
}


using System;

class _1068B
{
	static void Main()
	{
		long b = long.Parse(Console.ReadLine());
		int sqrt = (int)Math.Sqrt(b);
		int cnt = 0;
		for (int i = 1; i <= sqrt; ++i)
		{
			cnt += (b % i == 0) ? 2 : 0;
		}
		Console.WriteLine(cnt - ((sqrt * sqrt == b) ? 1 : 0));
	}
}


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

namespace B
{
    class Program
    {
        static void Main(string[] args)
        {
            long b = Int64.Parse(Console.ReadLine());

            Console.WriteLine(DivNum(b));
        }
        static long NOK(long a, long b)
        {
            return a * b / (NOD(a, b));
        }
        static long NOD(long a, long b)
        {
            long min, max;

            if (a > b)
            {
                min = b;
                max = a;
            }
            else if (a < b)
            {
                min = a;
                max = b;
            }
            else
            {
                return a;
            }

            while (min != max)
            {
                max = max - min;
                if (max < min)
                {
                    long t = max;
                    max = min;
                    min = t;
                }
            }

            return min;
        }
        static long DivNum(long b)
        {
            var count = 1; //Сразу учитываем само число как делитель

            for (int i = 1; i < b/2 + 1; i++)
            {
                if ((b % i) == 0)
                    count++;
            }

            return count;
        }
    }
}


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

namespace B
{
    class Program
    {
        static void Main(string[] args)
        {
            long b = Int64.Parse(Console.ReadLine());

            Console.WriteLine(DivNum(b));
        }
        static long NOK(long a, long b)
        {
            return a * b / (NOD(a, b));
        }
        static long NOD(long a, long b)
        {
            long min, max;

            if (a > b)
            {
                min = b;
                max = a;
            }
            else if (a < b)
            {
                min = a;
                max = b;
            }
            else
            {
                return a;
            }

            while (min != max)
            {
                max = max - min;
                if (max < min)
                {
                    long t = max;
                    max = min;
                    min = t;
                }
            }

            return min;
        }
        static long DivNum(long b)
        {
            int count = 0;

            if (b == 1)
                return 1;

            for (int i = 1; i < Math.Sqrt(b); i++)
            {
                if ((b % i) == 0)
                    count += 2;
            }
            if ((Math.Sqrt(b) % 2 == 0) && (b % Math.Sqrt(b) == 0))
                count++;

            return count;
        }
    }
}


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

namespace B
{
	class Program
	{
		static void Main(string[] args)
		{
			long b = Int64.Parse(Console.ReadLine());
			long sqrt = (long)Math.Sqrt(b) + 1;
			long[] divs = new long[sqrt]; int c = 0;
			for (int i = 2; i <= sqrt; i++)
			{
				if (b % i == 0)
				{
					while(b % i == 0)
					{
						divs[c]++;
						b = b / i;
					}
					c++;
				}
			}
			long answer = 1;
			for (int i = 0; i < c; i++)
			{
				answer = answer * (divs[i] + 1);
			}
			Console.WriteLine(answer);
		}
	}
}


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

namespace ConsoleApp2
{
    class Program
    {

        static void Main(string[] args)
        {
            long n = long.Parse(Console.ReadLine());
            Dictionary<long, int> SimpleDividers = new Dictionary<long, int>();
            long m = n;
            for(int i = 2; i*i < n; i++)
            {
                if(n % i == 0)
                {
                    SimpleDividers[i] = 0;
                    while(n % i == 0)
                    {
                        SimpleDividers[i]++;
                        n /= i;
                    }
                }
            }
            if(n != 1)
                SimpleDividers[n] = 1;
            long result = 1;
            foreach(long dividers in SimpleDividers.Keys)
            {
                result *= (SimpleDividers[dividers] + 1);
            }
            Console.WriteLine(result);
        }
    }
}


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

namespace ConsoleApp2
{
    class Program
    {

        static void Main(string[] args)
        {
            long n = long.Parse(Console.ReadLine());
            Dictionary<long, int> SimpleDividers = new Dictionary<long, int>();
            long m = n;
            for(int i = 2; i*i < m; i++)
            {
                if(n % i == 0)
                {
                    SimpleDividers[i] = 0;
                    while(n % i == 0)
                    {
                        SimpleDividers[i]++;
                        n /= i;
                    }
                }
            }
            if(n != 1)
                SimpleDividers[n] = 1;
            long result = 1;
            foreach(long dividers in SimpleDividers.Keys)
            {
                result *= (SimpleDividers[dividers] + 1);
            }
            Console.WriteLine(result);
        }
    }
}


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

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            long b = long.Parse(Console.ReadLine());
            Queue<int> step = new Queue<int>();
            for (int i=2;i<=Math.Sqrt(b);i++)
            {
                int x=0;
                while (b%i==0)
                {
                    b/=i;
                    x++;
                }
                if (x>0) step.Enqueue(x);
            }
            int z = 1;
            while (step.Count > 0)
                z *= (step.Dequeue() + 1);
            if (b == 2) Console.WriteLine(2);
            else Console.WriteLine(z);
        }
    }
}


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

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            long b = long.Parse(Console.ReadLine());
            Queue<int> step = new Queue<int>();
            for (int i=2;i<=b;i++)
            {
                int x=0;
                while (b%i==0)
                {
                    b/=i;
                    x++;
                }
                if (x>0) step.Enqueue(x);
            }
            int z = 1;
            while (step.Count > 0)
                z *= (step.Dequeue() + 1);

             Console.WriteLine(z);
        }
    }
}


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

public class Solver
{
    private const int SIEVE_SIZE = 100000;
    private readonly bool[] isComposite = new bool[SIEVE_SIZE + 1];
    private readonly IList<int> primes = new List<int>();
    void Sieve()
    {
        for (int i = 2; i * i <= SIEVE_SIZE; i++)
            if (!isComposite[i])
                for (int j = i * i; j <= SIEVE_SIZE; j += i)
                    isComposite[j] = true;
        for (int i = 2; i <= SIEVE_SIZE; i++)
            if (!isComposite[i])
                primes.Add(i);
    }

    public void Solve()
    {
        long b = ReadLong();

        Sieve();
        int ans = 1;
        foreach (int p in primes)
        {
            while (b % p == 0)
            {
                ans++;
                b /= p;
            }
        }
        if (b > 1)
            ans++;
        Write(ans);
    }

    #region Main

    protected static TextReader reader;
    protected 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("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solver().Solve();
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUG
            Console.WriteLine(ex);
#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); }
    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 double ReadDouble() { return double.Parse(ReadToken(), 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
}


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

namespace ConsoleApp75
{
    class Program
    {
        static void Main(string[] args)
        {
            long b = int.Parse(Console.ReadLine()), a = 1, kol = 0;
            for(int i = 1; i <= b; i++)
            {
                a = i;
                if (a % i == 0 && b % i == 0)
                    kol++;
            }
            Console.WriteLine(kol);
        }
    }
}


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

namespace ConsoleApp75
{
    class Program
    {
        static void Main(string[] args)
        {
            long b = long.Parse(Console.ReadLine()), a = 1, kol = 0;
            if (b < 1000)
            {
                for (a = 1; a <= b; a++)
                {
                    if (b % a == 0)
                        kol++;
                }
            }
            else
            {
                for (a = 1; a <= b; a+=b-1)
                {
                    if (b % a == 0)
                        kol++;
                }
            }
            Console.WriteLine(kol);
        }
    }
}


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

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();

			long b = long.Parse(input1);

			Console.WriteLine(b);
		}

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


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

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();

			long b = long.Parse(input1);

			long border = b / 2;
			long count = 1;
			for (long i = 2; i <= border; i++)
			{
				if (b % i > 0)
				{
					continue;
				}

				if (i == b / i)
				{
					count++;
				}
				else
				{
					count += 2;
				}
				border = b / i;
			}

			if (b > 1)
			{
				count++;
			}

			Console.WriteLine(count);
		}

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


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

namespace Codeforce
{

    class Printer
    {
        StringBuilder sb;

        public Printer()
        {
            sb = new StringBuilder();
        }

        public void WriteLine(string s)
        {
            sb.AppendLine(s);
        }

        public void Write(string s)
        {
            sb.Append(s);
        }

        public void Print()
        {
            Console.Write(sb);
        }
    }

    class Program
    {
        static StreamReader input = new StreamReader(Console.OpenStandardInput());
        //static StreamWriter output = new StreamWriter(Console.OpenStandardOutput());

        static int nextInt()
        {
            int t = input.Read();
            while ((t < '0' || t > '9' || t < 'A' || t > 'Z') && t != '-') t = input.Read();
            if (t >= 'A' && t <= 'Z')
                return t;
            int sign = 1;
            if (t == '-')
            {
                sign = -1;
                t = input.Read();
            }
            int x = 0;
            while (t >= '0' && t <= '9')
            {
                x *= 10;
                x += t - '0';
                t = input.Read();
            }
            return x * sign;
        }

        static int[] parseInt(string s)
        {
            string[] temp = s.Split(' ');
            int[] res = new int[temp.Length];
            for (int i = 0; i < temp.Length; i++)
            {
                res[i] = Convert.ToInt32(temp[i]);
            }
            return res;
        }

        static void Main(string[] args)
        {
            Printer printer = new Printer();

            int n = Convert.ToInt32(Console.ReadLine());

            List<int> res = new List<int>();

            Queue<string> Q = new Queue<string>();

            Q.Enqueue("1");

            while (Q.Count > 0)
            {
                string tmp = Q.Dequeue();
                res.Add(Convert.ToInt32(tmp));

                string tmp1 = tmp + "1", tmp2 = tmp + "0";

                if (Convert.ToInt32(tmp1) <= n)
                    Q.Enqueue(tmp1);
                if (Convert.ToInt32(tmp2) <= n)
                    Q.Enqueue(tmp2);
            }

            Console.WriteLine(res.Count);

            printer.Print();

        }
    }
}


using System;

class X{
public static void Main(String[] args){
int n = Int32.Parse(System.Console.ReadLine());
int result = 0;
for(int i = 1;i <= n; i++){
if(i.ToString().IndexOfAny("23456789".ToCharArray())== -1){
result = result + 1;
}
}
System.Console.WriteLine(result);
}
}