using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using System.Text;
using System;
using System.Numerics;

static class SolutionTemplate
{
    public class GCD
    {
        public static long Euclidean(long n1, long n2)
        {
            if (n1 < 1 || n2 < 1)
            {
                throw new ArgumentOutOfRangeException();
            }

            if (n1 == n2) return n1;
            else if (n1 < n2)
            {
                var tmp = n1;
                n1 = n2;
                n2 = tmp;
            }

            while (n1 % n2 > 0)
            {
                var tmp = n2;
                n2 = n1 % n2;
                n1 = tmp;
            }
            return n2;
        }

        public static ulong Inverse(ulong a, ulong n)
        {
            ulong x, y = 0;
            EuclideanExt(a, n, out x, out y);
            return x;
        }

        private static ulong EuclideanExt(ulong n1, ulong n2, out ulong x, out ulong y)
        {
            x = 0;
            y = 1;

            bool r = false;
            if (n1 == n2) return n1;

            else if (n1 < n2)
            {
                r = true;
                var tmp = n1;
                n1 = n2;
                n2 = tmp;
            }
            ulong q = 0;
            ulong xl = 1;
            ulong yl = 0;

            while (n2 > 0)
            {
                q = n1 / n2;

                var tmp = n2;
                n2 = n1 % n2;
                n1 = tmp;

                tmp = x;
                x = xl - q * x;
                xl = tmp;

                tmp = y;
                y = yl - q * y;
                yl = tmp;

            }
            x = xl;
            y = yl;
            if (r)
            {
                x = yl;
                y = xl;
            }
            return x * n1 + y * n2;
        }
    }
    public static List<T> GetOrAddNew<K, T>(this Dictionary<K, List<T>> dic, K key)
    {
        if (dic == null) throw new ArgumentNullException();

        return (dic[key] = dic.ContainsKey(key) ? dic[key] : new List<T>());
    }

    public static V GetValueOrDefault<K, V>(this Dictionary<K, V> dic, K key)
    {
        if (dic == null) throw new ArgumentNullException();

        if (dic.ContainsKey(key)) return dic[key];
        return default(V);
    }
    public static void AddOrSet<K>(this Dictionary<K, long> dic, K key, long add)
    {
        if (dic == null) throw new ArgumentNullException();

        dic[key] = dic.GetValueOrDefault(key) + add;
    }

    public static void AddOrSet<K>(this Dictionary<K, int> dic, K key, int add)
    {
        if (dic == null) throw new ArgumentNullException();

        dic[key] = dic.GetValueOrDefault(key) + add;
    }

    public static int AddExt<T>(this HashSet<T> hs, T val)
    {
        if (hs == null) throw new ArgumentNullException();

        if (!hs.Contains(val)) hs.Add(val);
        return hs.Count();
    }

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

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

    static long[] readLongs()
    {
        return Array.ConvertAll(Console.ReadLine().Trim().Split(), long.Parse);
    }

    static int[] readInts()
    {
        return Array.ConvertAll(Console.ReadLine().Trim().Split(), int.Parse);
    }

    static string[] readStrings()
    {
        return Console.ReadLine().Trim().Split();
    }

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

    public static int readInt(this StreamReader str)
    {
        if (str == null) throw new ArgumentNullException();
        return int.Parse(str.ReadLine().Trim());
    }

    public static int[] readInts(this StreamReader str)
    {
        if (str == null) throw new ArgumentNullException();
        return Array.ConvertAll(str.ReadLine().Trim().Split(), int.Parse);
    }

    static bool OutputList<T>(IEnumerable<T> lst, char delimeter = ' ')
    {
        StringBuilder sb = new StringBuilder();
        foreach (var el in lst)
        {
            sb.Append(el);
            sb.Append(delimeter);
        }
        Console.Write(sb);
        return true;
    }

    static bool OutputLine<T>(IEnumerable<T> lst, char delimeter = ' ')
    {
        StringBuilder sb = new StringBuilder();
        foreach (var el in lst)
        {
            sb.Append(el);
            sb.Append(delimeter);
        }
        Console.WriteLine(sb);
        return true;
    }

    static bool Output<T>(T val, char delimeter = ' ')
    {
        Console.Write(val);
        Console.Write(delimeter);
        return true;
    }
    static bool OutputLine<T>(T val)
    {
        Console.WriteLine(val);
        return true;
    }

    static List<Tuple<int, int>> readEdges(int n)
    {
        List<Tuple<int, int>> res = new List<Tuple<int, int>>(n);
        for (int i = 0; i < n; i++)
        {
            var arr = readInts();
            res.Add(Tuple.Create(arr[0], arr[1]));
        }
        return res;
    }

    static Dictionary<int, List<Tuple<int, int>>> readWDicEdges(int n)
    {
        Dictionary<int, List<Tuple<int, int>>> dic =
            new Dictionary<int, List<Tuple<int, int>>>(n);
        for (int i = 0; i < n - 1; i++)
        {
            var arr = readInts();
            var tpl = Tuple.Create(arr[0], arr[1], arr[2]);
            dic[tpl.Item1] = dic.ContainsKey(tpl.Item1) ? dic[tpl.Item1] : new List<Tuple<int, int>>();
            dic[tpl.Item2] = dic.ContainsKey(tpl.Item2) ? dic[tpl.Item2] : new List<Tuple<int, int>>();

            dic[tpl.Item1].Add(Tuple.Create(tpl.Item2, tpl.Item3));
            dic[tpl.Item2].Add(Tuple.Create(tpl.Item1, tpl.Item3));

        }
        return dic;
    }

    static List<Tuple<int, int>> readWEdges(int n)
    {
        List<Tuple<int, int>> res = new List<Tuple<int, int>>(n);
        for (int i = 0; i < n; i++)
        {
            var arr = readInts();
            res.Add(Tuple.Create(arr[0], arr[1]));
        }
        return res;
    }

    static Dictionary<int, List<int>> readDicEdges(int n)
    {
        Dictionary<int, List<int>> dic =
            new Dictionary<int, List<int>>(n);

        for (int i = 0; i < n - 1; i++)
        {
            var arr = readInts();
            var tpl = Tuple.Create(arr[0], arr[1]);
            dic[tpl.Item1] = dic.ContainsKey(tpl.Item1) ? dic[tpl.Item1] : new List<int>();
            dic[tpl.Item2] = dic.ContainsKey(tpl.Item2) ? dic[tpl.Item2] : new List<int>();

            dic[tpl.Item1].Add(tpl.Item2);
            dic[tpl.Item2].Add(tpl.Item1);
        }
        return dic;
    }

    private static long getGCD(long[] arr, int i, int j)
    {
        if (i == j)
            return arr[i];
        return GCD.Euclidean(getGCD(arr, i, (i + j) / 2), getGCD(arr, 1 + (i + j) / 2, j));
    }

    private static void Main(string[] args)
    {
        var str = readString();
        var t = readString();

        if (str.Length == 1)
        {
            Console.WriteLine(0);
            return;
        }

        int[] l = new int[t.Length];

        int j = 0;
        for (int i = 0; i < str.Length && j < t.Length; i++)
        {
            if (str[i] == t[j])
            {
                l[j] = i;
                j++;
            }
        }

        int[] r = new int[t.Length];
        j = t.Length - 1;
        for (int i = str.Length - 1; i >= 0 && j >= 0; i--)
        {
            if (str[i] == t[j])
            {
                r[j] = i;
                j--;
            }
        }
        var maxl = int.MinValue;
        for (int i = 0; i < t.Length - 1; i++)
        {
            maxl = Math.Max(maxl, r[i + 1] - l[i] - 1);
        }
        maxl = Math.Max(maxl, r[0]);
        maxl = Math.Max(maxl, str.Length - 1 - l[l.Length - 1]);
        Console.WriteLine(maxl);

    }
}


using System;

namespace CodeforcesSolution
{
    public class Escape
    {
        public static void Main(string[] args)
        {
            int vp, vd, t, f, c;
            vp = int.Parse(Console.ReadLine());
            vd = int.Parse(Console.ReadLine());
            t = int.Parse(Console.ReadLine());
            f = int.Parse(Console.ReadLine());
            c = int.Parse(Console.ReadLine());
            int count = 0;
            if (vp < vd)
            {
                float pp = t * vp;
                while (pp < c)
                {
                    float hour = (float)pp/(vd - vp);
                    if (pp + (hour * vp) >= c)
                    {
                        break;
                    }
                    count++;
                    pp += hour*vp;
                    float hourd = (pp/vd) + f;
                    pp += hourd*vp;

                }
            }
            Console.WriteLine(count);
        }
    }
}


using System;
using System.IO;

public class Codeforces{

    static void Main(){

        int n,w,k;
        string []inp=Console.ReadLine().Split(' ');
        k=int.Parse(inp[0]);
        n=int.Parse(inp[1]);
        w=int.Parse(inp[2]);

        int sum=0;
        for(int i=1;i<=w;i++)sum+=i*k;
        Console.WriteLine((sum-n<=0?0:sum-n));
    }
}


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

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split();
            int a = int.Parse(str[0]);
            int b = int.Parse(str[1]);
            int c = int.Parse(str[2]);
            if(a<=b&&a<=c)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }
    }
}


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

namespace codeforces
{
	class Program
	{
		public const int Osn = 1000000007;

		public class Pair
		{
			public long First;

			public long Second;
		}

		public class PairComparer : IComparer<Pair>
		{
			public int Compare(Pair x, Pair y)
			{
				if (x.First < y.First || (x.First == y.First && x.Second > y.Second))
					return -1;
				return 1;
			}
		}

		public static long GetGcd(long a, long b)
		{
			while (true)
			{
				if (b == 0)
					return a;
				var a1 = a;
				a = b;
				b = a1 % b;

			}
		}

		public static void WriteYesNo(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

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

		public static List<int> ReadListOfInts()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static List<long> ReadListOfLongs()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(long.Parse).ToList();
		}

		public static int ReadInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static long ReadLong()
		{
			var s = Console.ReadLine();
			return long.Parse(s);
		}

		public class Vertex
		{
			public int Was;

			public List<int> Edges;
		}

		public static List<Vertex> Graph = new List<Vertex>();

		public static bool Dfs(int u)
		{
			if (Graph[u].Was == 1) return true;
			if (Graph[u].Was == 2) return false;
			Graph[u].Was = 1;
			foreach (var t in Graph[u].Edges)
			{
				if (Dfs(t)) return true;
			}

			Graph[u].Was = 2;
			return false;
		}

		public static bool IsPrime(int x)
		{
			for (var j = 2; j * j <= x; ++j)
				if (x % j == 0)
					return false;
			return true;
		}

		public class LinkedVertex
		{
			public int Next;

			public int Prev;

			public int Value;
		}

		public static int BinarySearch(List<int> list, int value)
		{
			var l = -1;
			var r = list.Count;
			while (r - l > 1)
			{
				var m = (r + l) / 2;
				if (list[m] >= value)
					r = m;
				else
					l = m;
			}

			return r;
		}

		private static void Main()
		{
			var n = ReadInt();
			var fives = 0;
			var ans = new List<int>();
			var i = 1;
			while (fives <= n)
			{
				i++;
				var j = i;
				while (j % 5 == 0)
				{
					fives++;
					j /= 5;
				}
				if (fives == n)
					ans.Add(i);
			}
			Console.WriteLine(ans.Count);
			for (var ii = 0; ii < ans.Count; ++ii)
				Console.Write("{0} ", ans[ii]);
			Console.ReadLine();
		}
	}
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
           string s= Console.ReadLine();
            string ss ="abcdefghijklmnopqrstuvwxyz";
            int si = 0, count = 0, a = ss.IndexOf('a'),n;
            while (si<s.Length)
            {
                n = ss.IndexOf(s[si]) - a;
                n = n < 0 ? (n *= -1) : n;
                count += n > 13 ?(26 - (n)):(n);
                a = ss.IndexOf(s[si]);
                si++;
            }
            Console.WriteLine(count);
        }
    }
}


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

class P
{
	public static void Main()
	{
		int[] R = System.Console.ReadLine().Split(' ').Select(x=>int.Parse(x)).ToArray();
		int n = R[0];
		int m = R[1];

		if(n==1)
		{
			System.Console.WriteLine(1);
			return;
		}

		int a;
		if(n-m > m -1)
		{
			a = m + 1;
		}
		else
		{
			a = m -1;
		}

		System.Console.WriteLine(a);
	}
}


using System;

class Program
{
    static void Main(string[] args)
    {
        char[] str1 = Console.ReadLine().ToCharArray();
        char[] str2 = Console.ReadLine().ToCharArray();
        char[] result = new char[str2.Length];

        for (int i = 0; i < str2.Length; i++)
        {
            if (str1[i] == str2[i])
                result[i] = '0';
            else
                result[i] = '1';
        }

        foreach (var VARIABLE in result)
        {
            Console.Write(VARIABLE);
        }
    }
}


using System;
using System.Linq;

class Problem
{
    public static void Main()
    {
        int t = int.Parse(Console.ReadLine());
        int[] input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        int hours = input[0];
        int minutes = input[1];

        int count = 0;
        while (hours % 10 != 7 && minutes % 10 != 7)
        {
            minutes -= t;
            if (minutes < 0)
            {
                minutes = 60 + minutes;
                hours--;
                if (hours < 0)
                {
                    hours = 23;
                }
            }

            count++;
        }

        Console.WriteLine(count);
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s;
            byte b;
            s = Console.ReadLine();
            if (byte.TryParse(s, out b) && b < 100)
            {
                string result = string.Empty;
                if (0 <= b && b <= 20 || b % 10 == 0)
                {
                    result = NumberToString(b);
                }
                else
                {
                    byte first = Convert.ToByte(b % 10);
                    byte second = Convert.ToByte(Convert.ToByte(b / 10) * 10);
                    result = NumberToString(second);
                    result = string.Format("{0}-{1}", result, NumberToString(first));
                }
                Console.WriteLine(result);
            }
            Console.ReadLine();
        }

        static string NumberToString(byte N)
        {
            switch (N)
            {
                case 0:
                    return "zero";
                case 1:
                    return "one";
                case 2:
                    return "two";
                case 3:
                    return "three";
                case 4:
                    return "four";
                case 5:
                    return "five";
                case 6:
                    return "six";
                case 7:
                    return "seven";
                case 8:
                    return "eight";
                case 9:
                    return "nine";
                case 10:
                    return "ten";
                case 11:
                    return "eleven";
                case 12:
                    return "twelve";
                case 13:
                    return "thirteen";
                case 14:
                    return "fourteen";
                case 15:
                    return "fifteen";
                case 16:
                    return "sixteen";
                case 17:
                    return "seventeen";
                case 18:
                    return "eighteen";
                case 19:
                    return "nineteen";
                case 20:
                    return "twenty";
                case 30:
                    return "thirty";
                case 40:
                    return "forty";
                case 50:
                    return "fifty";
                case 60:
                    return "sixty";
                case 70:
                    return "seventy";
                case 80:
                    return "eighty";
                case 90:
                    return "ninety";
            }
            return string.Empty;
        }
    }
}


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

namespace CF06032015
{
    class Program
    {

        static int Check(char ch)
        {
           switch(ch)
           {
               case 'q':
                   return 9;
               case 'r':
                   return 5;
               case 'b':
                   return 3;
               case 'n':
                   return 3;
               case 'p':
                   return 1;
               case 'k':
                   return 0;
               default:
                   return 0;
           }
        }

        static void Main(string[] args)
        {
            int d1 = 0, d2 = 0;
            for(int i=0;i<8;++i)
            {
                var x = Console.ReadLine();
                foreach(var ch in x)
                {
                    if(char.IsUpper(ch))
                    {
                        d1 += Check(char.ToLower(ch));
                    }
                    else
                    {
                        d2 += Check(ch);
                    }
                }
            }

            Console.WriteLine(d1 == d2 ? "Draw" : d1 > d2 ? "White" : "Black");
        }
    }
}


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

namespace Codeforces
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;

        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }

        object Get()
        {
            checked
            {
                var a = ReadInts();
                var group = a.GroupBy(x => x).Select(x => new { x.Key, Count = x.Count() }).Where(x => x.Count > 1).ToArray();
                if (group.Length == 0)
                    return a.Sum();
                if (group[0].Count == 4 || group[0].Count == 5)
                    return a.Sum() - group[0].Key * 3;
                return a.Sum() - group.Select(x => x.Key * x.Count).Max();
            }
        }

        public byte[] Convert1(string s)
        {
            var result = new byte[s.Length * 6];
            for (int i = 0; i < s.Length; i++)
            {
                var digit = Convert2(s[i]);
                for (int j = 0; j < 6; j++)
                {
                    result[6 * i + j] = (byte)((digit >> j) & 1);
                }
            }
            return result;
        }

        private int Convert2(char c)
        {
            if (c >= '0' && c <= '9')
                return c - '0';
            if (c >= 'a' && c <= 'z')
                return c - 'a' + 36;
            if (c >= 'A' && c <= 'Z')
                return c - 'A' + 10;
            if (c == '-')
                return 62;
            if (c == '_')
                return 63;
            throw new Exception("huj");
        }

        class Automata
        {
            bool[] terminals;
            public int sigma;
            public int len;
            public int[,] jumps;

            public void Create()
            {
                var a = ReadInts();
                len = a[0];
                sigma = a[2];
                var ts = ReadInts();
                terminals = new bool[len];
                for (int i = 0; i < ts.Length; i++)
                    terminals[ts[i]] = true;
                jumps = new int[len, sigma];
                for (int i = 0; i < len * sigma; i++)
                {
                    var b = Console.ReadLine().Split(' ');
                    jumps[Convert.ToInt32(b[0]), b[1][0] - 'a'] = Convert.ToInt32(b[2]);
                }
            }
            protected int[] ReadInts()
            {
                return Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
            }

            public bool IsTerminal(int s)
            {
                return terminals[s];
            }
        }
    }

    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (f == null)
                f = string.IsNullOrEmpty(FileName)
                    ? new StreamReader(Console.OpenStandardInput())
                    : new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName);
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return int.Parse(Read());
        }

        protected int[] ReadInts()
        {
            var tokens = Read().Split(' ');
            var result = new int[tokens.Length];
            for (int i = 0; i < tokens.Length; i++)
                result[i] = int.Parse(tokens[i]);
            return result;
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            var tokens = Read().Split(' ');
            var result = new long[tokens.Length];
            for (int i = 0; i < tokens.Length; i++)
                result[i] = long.Parse(tokens[i]);
            return result;
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName, r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {

            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func, T defaultValue = default(T))
        {
            T result = defaultValue;
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }

        public static string JoinStrings(this IEnumerable<int> source, string delimeter)
        {
            return source.Select(x => x.ToString()).JoinStrings(delimeter);
        }
    }
}


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

namespace Codeforces
{
    class Program
    {

        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string[] arr = str.Split(' ');
            int m = Int32.Parse(arr[0]);
            int n = Int32.Parse(arr[1]);
            int am = 0;
            if (m * n >= 2)
            {
               am = m*n/2;
            }
            Console.WriteLine(am);
        }
    }
}


using System;
using System.IO;

class Algo
{
    public void Run()
    {
        string[] tokens = cin.ReadLine().Split();
        int n = int.Parse(tokens[0]);
        int m = int.Parse(tokens[1]);
        int ans = n / 2 + n % 2;
        if (ans + n / 2 < m)
        {
            cout.WriteLine("-1");
            return;
        }
        cout.WriteLine(ans + (m - ans % m) % m);
    }

    public StreamReader cin = null;
    public StreamWriter cout = null;
}

class Program
{
    static void Main()
    {
        Algo task = new Algo();
#if DEBUG
        task.cin = new StreamReader("input.txt");
        task.cout = new StreamWriter("output.txt");
#else
        task.cin = new StreamReader(Console.OpenStandardInput());
        task.cout = new StreamWriter(Console.OpenStandardOutput());
#endif
        task.cout.AutoFlush = true;
        task.Run();
    }
}


using System;
class Program{
	static int [, ] b = new int[3, 3];
	static int [, ] a = new int[3, 3];
	static void fn(int i, int j){
		try{
			b[i - 1, j]++;
		}catch{}
		try{
			b[i, j - 1]++;
		}catch{}
		try{
			b[i, j]++;
		}catch{}
		try{
			b[i, j + 1]++;
		}catch{}
		try{
			b[i + 1, j]++;
		}catch{}
	}
	static void Main(string[] args){
		int i = 0, j = 0;

		for(i = 0; i < 3; i++){
			string [] s = Console.ReadLine().Split();
			a[i, 0] = int.Parse(s[0]) % 2;
			a[i, 1] = int.Parse(s[1]) % 2;
			a[i, 2] = int.Parse(s[2]) % 2;
		}

		for(i = 0; i < 3; i++){
			for(j = 0; j < 3; j++){
				if(a[i, j] != 0){
					fn(i, j);
				}
			}
		}

		for(i = 0; i < 3; i++){
			for(j = 0; j < 3; j++){
				if(b[i, j] % 2 != 0){
					Console.Write("0");
				}else{
					Console.Write("1");
				}
			}
			Console.WriteLine();
		}
	}
}


//Rextester.Program.Main is the entry point for your code. Don't change it.
//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5

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

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string ip = Console.ReadLine();
            int []count = new int[3]; //RGB
            for(int i=0;i<n;i++){
                if(ip[i]=='R')
                    count[0]++;
                else if(ip[i]=='G')
                    count[1]++;
                else if(ip[i]=='B')
                    count[2]++;
            }
            //Console.WriteLine("{0} {1} {2}",count[0],count[1],count[2]);
            string s="";
            //all three cards
            if(count[0]!=0 && count[1]!=0 && count[2]!=0)
                s+="BGR";

            //only one type of card
            else if(count[0]!=0 && count[1]==0 && count[2]==0)
                s+="R";
            else if(count[0]==0 && count[1]!=0 && count[2]==0)
                s+="G";
            else if(count[0]==0 && count[1]==0 && count[2]!=0)
                s+="B";

            //two type of card but only one of each
            else if(count[0]==1 && count[1]==1 && count[2]==0)
                s+="B";
            else if(count[0]==0 && count[1]==1 && count[2]==1)
                s+="R";
            else if(count[0]==1 && count[1]==0 && count[2]==1)
                s+="G";

            //atleast two of one and only one of second
            else if(count[0]>=2 && count[1]==1 && count[2]==0)
                s+="BG";
            else if(count[0]>=2 && count[1]==0 && count[2]==1)
                s+="BG";
            else if(count[0]==0 && count[1]>=2 && count[2]==1)
                s+="BR";
            else if(count[0]==1 && count[1]>=2 && count[2]==0)
                s+="BR";
            else if(count[0]==1 && count[1]==0 && count[2]>=2)
                s+="GR";
            else if(count[0]==0 && count[1]==1 && count[2]>=2)
                s+="GR";

             //if only two type but both greater than two
             else if(count[0]>=2 && count[1]>=2 && count[2]==0)
                s+="BGR";
            else if(count[0]>=2 && count[1]==0 && count[2]>=2)
                s+="BGR";
            else if(count[0]==0 && count[1]>=2 && count[2]>=2)
                s+="BGR";
            Console.WriteLine(s);
        }
    }
}


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)
        {
            int a, b;
            string[] inp = Console.ReadLine().Split(' ');
            a = Convert.ToInt32(inp[0]);
            b = Convert.ToInt32(inp[1]);
            int dop = Math.Max(a,b);
            double mid = (1.0 * a + b) / 2;
            dop = 1 - (int)((mid - (int)mid) * 2);
            String s = ((int)mid - dop).ToString() + " " + dop.ToString() + " " + (6 - (int)mid).ToString();
            if (a < b)
                Console.WriteLine(s);
            else if(a > b)
            {
                char[] res = s.ToCharArray();
                Array.Reverse(res);
                Console.WriteLine(res);
            }
            else
            {
                Console.WriteLine("0 6 0");
            }
        }
    }
}


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

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            var str = Console.ReadLine();
            int ans = 0;
            char cur =' ';
            int t =0;
            for (int i = 0; i < str.Length; i++)
            {
                if (cur == ' ') { cur = str[i]; t=1; continue; }
                if (str[i] == cur)
                    t++;
                else
                {
                    ans++;
                    cur = str[i];
                    t=1;
                }
                if (t == 5) { ans++; cur = ' '; t = 0; }
            }
            if (t != 0) ans++;
            Console.WriteLine(ans);
        }
    }
}


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

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

    internal class Task : IDisposable
    {
        private readonly InputReader sr;
        private readonly TextWriter sw;
        private bool isDispose;

        public Task(InputReader sr, TextWriter sw)
        {
            this.sr = sr;
            this.sw = sw;
        }

        public void Solve()
        {
            var n = sr.NextInt32();
            var see = 3;
            var pl1 = 1;
            var pl2 = 2;
            for (var i = 0; i < n; i++) {
                var next = sr.NextInt32();
                if (next == see) {
                    sw.WriteLine("NO");
                    return;
                }
                if (pl1 == next) {
                    var tmp = pl2;
                    pl2 = see;
                    see = tmp;
                }
                else {
                    var tmp = pl1;
                    pl1 = see;
                    see = tmp;
                }
            }

            sw.WriteLine("YES");
        }

        ~Task()
        {
            Dispose(false);
        }

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

        private void Dispose(bool disposing)
        {
            if (!isDispose) {
                if (disposing) {
                    if(sr != null)
                        sr.Dispose();

                    if(sw != null)
                        sw.Dispose();
                }

                isDispose = true;
            }
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;
    private string[] buffer;
    private int seek;

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

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

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

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

    private string ReadNextToken()
    {
        if (buffer == null || seek == buffer.Length) {
            seek = 0;
            buffer = NextSplitStrings();
        }

        return buffer[seek++];
    }

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

    public int[] ReadArrayOfInt32()
    {
        return ReadArray(Int32.Parse);
    }

    public long[] ReadArrayOfInt64()
    {
        return ReadArray(Int64.Parse);
    }

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

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

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

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

            isDispose = true;
        }
    }

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


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

namespace AlgoHelper
{
    public class Pair
    {
        public int X { get; set; }
        public int Y { get; set; }

        public Pair(int x, int y)
        {
            X = x;
            Y = y;
        }

        public override bool Equals(object obj)
        {
            var pair = obj as Pair;
            return X + Y == pair.X + pair.Y;
        }

        public override int GetHashCode()
        {
            var hashCode = 1861411795;
            hashCode = hashCode * -1521134295 + X.GetHashCode();
            hashCode = hashCode * -1521134295 + Y.GetHashCode();
            return hashCode;
        }

        public override string ToString()
        {
            return $"X = {X} Y = {Y}";
        }
    }

    class PairComparer : IComparer<Pair>
    {
        public int Compare(Pair x, Pair y)
        {
            return y.Y.CompareTo(x.Y);
        }
    }

    class Person
    {
        public int Age { get; set; }
        public string Name { get; set; }

    }

    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string s = Console.ReadLine();

            if (n < 11) Console.WriteLine(0);
            else
            {
                Dictionary<char,int> dict = new Dictionary<char, int>();

                foreach (char c in s)
                {
                    if (dict.ContainsKey(c)) dict[c]++;
                    else dict[c] = 1;
                }

                if (!dict.ContainsKey('8')) Console.WriteLine(0);
                else
                {
                    int max = n / 11;
                    int maxOfEight = dict['8'];
                    int ans = Math.Min(max, maxOfEight);
                    Console.WriteLine(ans);
                }
            }

           // Console.ReadKey();
        }

        public static int NumDecodings(string s)
        {
            if (s.Length == 1) return 1;
            if (s.Length == 2)
            {
                int number = int.Parse(s);

                if (number <= 26)
                {
                    if (s.Contains("0")) return 1;
                    return 2;
                }

                return 0;
            }

            return NumDecodings(s.Substring(0,1)) + NumDecodings(s.Substring(1));
        }

        static int makingAnagrams(string s1, string s2)
        {
            int length = s1.Length + s2.Length;

            int[] freqA = frequency(s1);
            int[] freqB = frequency(s2);

            Console.WriteLine(string.Join("|",freqA));
            Console.WriteLine(string.Join("|", freqB));

            int count = 0;

            for (int i = 0; i < freqA.Length; i++)
            {
                if (freqA[i] != freqB[i]) count++;
            }

            return length - count;
        }
        public static int firstMissingPositive(int[] a)
        {
            int missing = 1;

            HashSet<int> set = new HashSet<int>();

            for (int i = 0; i < a.Length; i++)
            {
                if(a[i]>missing)
                {
                    set.Add(a[i]);
                }
                else if(a[i] == missing)
                {
                    if(!set.Contains(missing+1))
                    {
                        missing++;
                    }
                    else
                    {
                        missing = returnNewMax(++missing, set);
                    }
                }
            }

            return missing;
        }

        private static int returnNewMax(int n, HashSet<int> set)
        {
            while(set.Contains(n))
            {
                n++;
            }

            return n;
        }

        private static bool checkForAllZeroes(string s)
        {
            foreach(char c in s)
            {
                if (c != '0') return false;
            }

            return true;
        }

        private static int getHigherNumber(int n,int max)
        {
            int currentLength = maxLength(n);

            if (currentLength < max)
            {
                int diff = max - currentLength;
                int newNumber = n * (int)Math.Pow(10, diff);
                return newNumber;
            }

            return n;
        }

        private static int maxLength(int n)
        {
            return n.ToString().Length;
        }

        static int gemstones(string[] arr)
        {
            int[][] frequencies = new int[arr.Length][];

            for (int i = 0; i < frequencies.Length; i++)
            {
                frequencies[i] = frequency(arr[i]);
            }

            int count = 0;
            bool flag = true;

            for (int i = 0; i < frequencies[0].Length; i++) //26
            {
                for (int j = 0; j < frequencies.Length - 1; j++)
                {
                    if (frequencies[j][i] == 0 || frequencies[j + 1][i] == 0)
                    {
                        flag = false;
                        break;
                    }
                }

                if (flag) count++;
                flag = true;
            }

            return count;
        }

        private static bool isFunny(string s)
        {
            int[] diff = difference(s);

            return isPalindrome(diff);
        }

        private static int []  difference (string a)
        {
            int[] ans = new int[a.Length - 1];

            for (int i = 0; i < a.Length - 1; i++)
            {
                ans[i] = Math.Abs(a[i] - a[i + 1]);
            }

            return ans;
        }

        private static bool isPalindrome(int [] a)
        {
            for(int i=0;i<a.Length/2;i++)
            {
                if (a[i] != a[a.Length - 1 - i]) return false;
            }

            return true;
        }

        private static bool hasSubstring(string a, string b)
        {
            int[] freqA = frequency(a);
            int[] freqB = frequency(b);

            for (int i = 0; i < freqA.Length; i++)
            {
                if (freqA[i]!=0 && freqA[i] == freqB[i]) return true;
            }

            return false;
        }

        private static int LowerBound(int [] a, int target)
        {
            int lo = 0;
            int hi = a.Length - 1;
            int ans = -1;

            while(lo<=hi)
            {
                int med = hi - (hi - lo) / 2;

                if (target == a[med])
                {
                    ans = med;
                    hi = med - 1;
                }
                else if (target > a[med])
                {
                    lo = med + 1;
                }

                else hi = med - 1;
            }

            return ans;
        }

        private static string randomString(Random r)
        {
            int l = r.Next(1,10);

            string s = string.Empty;

            for (int i = 0; i < l; i++)
            {
                s += char.ConvertFromUtf32(r.Next(96, 122));
            }

            return s;
        }

        private static int [] prefixMax(int [] a)
        {
            int max = a[a.Length - 1];

            Stack<int> stack = new Stack<int>();

            stack.Push(a[a.Length - 1]);

            int[] b = new int[a.Length];

            b[a.Length - 1] = -1;

            bool found = false;

            for (int i = a.Length - 2; i >=0; i--)
            {
                while (stack.Count > 0)
                {
                    int temp = stack.Peek();

                    if (temp > a[i])
                    {
                        b[i] = temp;
                        found = true;
                        break;
                    }
                    else
                    {
                        stack.Pop();
                    }
                }

                stack.Push(a[i]);
                if (!found) b[i] = -1;
                found = false;
            }

            return b;
        }

        private static bool hasTheSameLetters(string a, string b)
        {

            int[] freqA = frequency(a);
            int[] freqB = frequency(b);

            for (int i = 0; i < freqA.Length; i++)
            {
                if (freqA[i] != 0 && freqB[i] != 0) return true;
            }

            return false;
        }

        private static int [] frequency(string s)
        {
            int[] a = new int[26];

            foreach(char c in s)
            {
                a[c - 'a']++;
            }

            return a;
        }

        private static bool checkTwoArrays(int [] a,int []b)
        {
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] != b[i]) return false;
            }

            return true;
        }

        private static long solution(long[] a, long h, long lo,long hi)
        {
            long med = hi - (hi - lo) / 2;
            while(lo<=hi)
            {
                med = hi - (hi - lo) / 2;
                long ans = solve(a, med);
                Console.WriteLine($"ans = {ans} lo = {lo} med = {med}");
                if (ans <= h) hi = med - 1;
                else if (ans > h) lo = med + 1;
            }

            return lo;
        }

        private static long solve(long [] a,long k)
        {
            long sum = 0;

            for (int i = 0; i < a.Length; i++)
            {
                if (a[i]<=k)
                {
                    sum++;
                }
                else
                {
                    sum += (a[i] / k) + 1;
                }
            }

            return sum;
        }

        public static bool LemonadeChange(int[] bills)
        {
            if (bills[0] > 5) return false;

            Dictionary<int, int> dict = new Dictionary<int, int>();

            int currentAmount = 5;

            dict[5] = 1;

            for (int i = 1; i < bills.Length; i++)
            {
                if (bills[i] > 5)
                {
                    int charge = bills[i] - 5;
                    if (currentAmount < charge) return false;

                    currentAmount+=5;
                }
                else
                {
                    currentAmount += bills[i];
                    dict[5]++;
                }
            }

            return false;
        }

        private static int solve(int n,int x,int y,int d)
        {
            if ((y-x) % d == 0) {
                return (y - x) / d;
            }

            if((x-y)%d==0)
            {
                return (x - y) / d;
            }

            if((y-1)%d==0)
            {
                int firstStep = 0;

                if ((x-1)%d==0)
                {
                    firstStep = (x - 1) / d;
                }
                else
                {
                    firstStep = (x - 1) / d + 1;
                }

                int secodnStep = (y - 1) / d;

                return firstStep + secodnStep;

            }

            return -1;
        }
        public static int max(int [] a, int i)
        {
            if (i == a.Length - 1) return a[a.Length - 1];
            else return Math.Max(a[i], max(a, i + 1));
        }

        public static int MaxArea(int[] a)
        {
            int l = 0;
            int r = a.Length - 1;

            int max = int.MinValue;

            while (l < r)
            {
                max = Math.Max(max, Math.Min(a[l], a[r]) * (r - l));

                if (a[l] < a[r]) l++;
                else r--;
            }

            return max;
        }

        private static bool isPrime(int n)
        {
            if (n < 2) return false;

            for(int i=2;i*i<=n;i++)
            {
                if (n % i == 0) return false;
            }

            return true;
        }

        private static void Swap(ref char a, ref char b)
        {
            char temp = a;
            a = b;
            b = temp;
        }
    }
}


using System;
using System.Linq;

namespace CF491_B
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var s = Console.ReadLine().Split().Select(double.Parse).ToArray();
            var a = s.Average();
            Array.Sort(s);
            var c = 0;
            while (a < 4.5)
            {
                s[c] = 5;
                a = s.Average();
                c++;
            }
            Console.WriteLine(c);
        }
    }
}


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

namespace Burglar_and_Matches
{
    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();
            int m = Next();

            var a = new int[m];
            var b = new int[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = Next();
                b[i] = Next();
            }

            Array.Sort(b, a);

            int sum = 0;
            for (int i = m - 1; i >= 0; i--)
            {
                if (a[i] < n)
                {
                    sum += a[i]*b[i];
                    n -= a[i];
                }
                else
                {
                    sum += n*b[i];
                    break;
                }
            }

            writer.WriteLine(sum);
            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;
class Program
{
    static void Main()
    {
        string[] s = Console.ReadLine().Split();
        int x1 = int.Parse(s[0]);
        int y1 = int.Parse(s[1]);
        s = Console.ReadLine().Split();
        int x2 = int.Parse(s[0]);
        int y2 = int.Parse(s[1]);
        int x = Math.Abs(x1 - x2);
        int y = Math.Abs(y1 - y2);
        if (x > y)
            Console.WriteLine(x);
        else
            Console.WriteLine(y);
    }
}


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

namespace first
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, c,aMod,bMod,cMod;
            string str = Console.ReadLine();
            a=int.Parse(str);
            str=str.Replace("0", "");
            aMod = int.Parse(str);
            str = Console.ReadLine();
            b = int.Parse(str);
            str=str.Replace("0", "");
            bMod = int.Parse(str);
            c = a + b;
            cMod = int.Parse(c.ToString().Replace("0", ""));
            if ((aMod + bMod) == cMod)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }
    }
}


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

namespace Codeforces
{
    class B
    {
        private static bool s_time = false;
        private static object Go()
        {
            int n = GetInt();
            string s = GetString();

            char[] first = s.Substring(0, n).ToCharArray();
            char[] second = s.Substring(n).ToCharArray();

            Array.Sort(first);
            Array.Sort(second);

            bool yes = true;
            for (int i = 0; i < n; i++)
            {
                if (first[i] >= second[i]) { yes = false; break; }
            }
            if (yes) return "YES";

            yes = true;
            for (int i = 0; i < n; i++)
            {
                if (first[i] <= second[i]) { yes = false; break; }
            }
            if (yes) return "YES";

            return "NO";
        }

        #region Template

        public static void Main(string[] args)
        {
            DateTime start = DateTime.Now;
            object output = Go();
            TimeSpan duration = DateTime.Now.Subtract(start);
            if (output != null)
                Wl<string>(output.ToString());
            if (s_time)
                Wl(duration);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            while (ioEnum == null || !ioEnum.MoveNext())
            {
                ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
            }

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString());
        }

        private static long GetLong()
        {
            return long.Parse(GetString());
        }

        private static double GetDouble()
        {
            return double.Parse(GetString());
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            Console.WriteLine(o.ToString());
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            Wl(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        public struct Tuple<T, K> : IComparable<Tuple<T, K>>
            where T : IComparable<T>
            where K : IComparable<K>
        {
            public T Item1;
            public K Item2;

            public Tuple(T t, K k)
            {
                Item1 = t;
                Item2 = k;
            }

            public override bool Equals(object obj)
            {
                var o = (Tuple<T, K>)obj;
                return o.Item1.Equals(Item1) && o.Item2.Equals(Item2);
            }

            public override int GetHashCode()
            {
                return Item1.GetHashCode() ^ Item2.GetHashCode();
            }

            public override string ToString()
            {
                return "(" + Item1 + " " + Item2 + ")";
            }

            #region IComparable<Tuple<T,K>> Members

            public int CompareTo(Tuple<T, K> other)
            {
                int ret = Item1.CompareTo(other.Item1);
                if (ret != 0) return ret;
                return Item2.CompareTo(other.Item2);
            }

            #endregion
        }

        #endregion
    }
}


using System;
using System.Linq;
using System.Numerics;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input = Console.ReadLine();
			//var inputs = input.Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries);

			long n = long.Parse(input);

			if (n < 10)
			{
				Console.WriteLine(n);
				return;
			}

			long count = 9;
			for (long i = 1; i < 10; i++)
			{
				long bottom = (long)Math.Pow(10, i);
				long upper = (long)(Math.Pow(10, i + 1) - 1);

				if (n >= bottom && n > upper)
				{
					count += (i + 1) * 9 * bottom;
					continue;
				}

				if (n >= bottom && n <= upper)
				{
					var numbers = n - bottom + 1;
					count += (i + 1) * numbers;
					break;
				}
			}

			Console.WriteLine(count);
		}

		//private static int Length(short[] a)
		//{
		//	int firstItemIndex = 0;
		//	for (int i = 0; i < a.Length; i++)
		//	{
		//		if (a[i] == 0)
		//		{
		//			continue;
		//		}

		//		firstItemIndex = i;
		//		break;
		//	}

		//	return a.Length - firstItemIndex;
		//}

		//private static short[] Subtract(short[] a, short[] b)
		//{
		//	if (a.Length != b.Length)
		//	{
		//		throw new ArgumentException();
		//	}

		//	short[] result = new short[a.Length];
		//	Array.Copy(a, result, a.Length);
		//	for (int i = result.Length - 1; i >= 0; i--)
		//	{
		//		if (result[i] < b[i])
		//		{
		//			int j = i - 1;
		//			while (result[j] == 0)
		//			{
		//				result[j--] = 9;
		//			}

		//			result[j]--;
		//			result[i] += 10;
		//		}

		//		result[i] -= b[i];
		//	}

		//	return result;
		//}

		//private static short[] Multiply(short[] a, int b)
		//{
		//	short[] result = new short[a.Length];
		//	for (int i = a.Length - 1; i > 0; i--)
		//	{
		//		int temp = a[i] * b;
		//		result[i] = (short)(result[i] + temp % 10);
		//		result[i - 1] = (short)(result[i - 1] + temp / 10);
		//	}

		//	return result;
		//}

		//private static int Mod(short[] a, int b)
		//{
		//	int rest = 0, i = 0;
		//	while (i < a.Length)
		//	{
		//		int d = 10 * rest + a[i];
		//		while (d < b && i < a.Length - 1)
		//		{
		//			d = 10 * d + a[++i];
		//		}

		//		rest = d % b;
		//		i++;
		//	}

		//	return rest;
		//}

		//private static short[] Divide(short[] a, int b)
		//{
		//	short[] result = new short[a.Length];
		//	int rest = 0, i = 0;
		//	while (i < a.Length)
		//	{
		//		int d = 10 * rest + a[i];
		//		while (d < b && i < a.Length - 1)
		//		{
		//			d = 10 * d + a[++i];
		//		}

		//		result[i] = (short)(d / b);
		//		rest = d % b;
		//		i++;
		//	}

		//	return result;
		//}
	}
}


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

namespace ConsoleApp1
{
    class Program
    {

        static void Main(string[] args)
        {
            var s = Console.ReadLine();
            var res = (s.Length - 1) / 2 + 1;
            if (s.IndexOf('1', 1) == -1 && s.Length % 2 == 1){
                res -= 1;
            }
            Console.WriteLine(res);

        }

    }
}


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

namespace YA
{
	public class Program
	{
		static void Main(string[] args)
		{
			var n = int.Parse(Console.ReadLine());
			var years = Console.ReadLine().Split().Select(x => int.Parse(x)).OrderBy(x => x).ToArray();

			if (n % 2 == 1)
			{
				Console.WriteLine(years[n / 2]);
			}
			else
			{
				if (years[0] == 2010)
				{
					Console.WriteLine(years[0]);
				}
				else if (years[n - 1] == 2100)
				{
					Console.WriteLine(years[n - 1]);
				}
			}
			//Console.ReadKey();
		}
	}
}


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

namespace Piles_With_Stones
{
    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)
        {
            writer.WriteLine(Solve(args) ? "Yes" : "No");
            writer.Flush();
        }

        private static bool Solve(string[] args)
        {
            int n = Next();
            int s1 = 0;
            for (int i = 0; i < n; i++)
            {
                s1 += Next();
            }
            int s2 = 0;
            for (int i = 0; i < n; i++)
            {
                s2 += Next();
            }
            return s2 <= s1;
        }

        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;
namespace ConsoleApplication35
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = Convert.ToInt32(Console.ReadLine());
            string c = Console.ReadLine();

            if (c[0] == 'S')
            {
                if (c[c.Length - 1] == 'F')
                {
                    Console.WriteLine("YES");
                    return;
                }
            }
            Console.WriteLine("NO");
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;

namespace ConsoleApplication1
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var s = Console.ReadLine().Split(' ');
            int min1 = int.Parse(s[0]),
                max1 = int.Parse(s[1]);
            s = Console.ReadLine().Split(' ');
            int min2 = int.Parse(s[0]),
                max2 = int.Parse(s[1]);
            s = Console.ReadLine().Split(' ');
            int min3 = int.Parse(s[0]),
                max3 = int.Parse(s[1]);
            if(n - min3 - min2 <=max1)
                Console.WriteLine((n - min3 - min2) + " " + min2 + " " + min3);
            else if (n - max1 - min3 <= max2)
            {
                Console.WriteLine(max1 + " " + (n - max1 - min3) + " " + min3);
            }
            else
                Console.WriteLine(max1 + " " + max2 + " " + (n - max1 - max2));
        }
    }
}


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

namespace GoogleCodeJam2021
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] a = Console.ReadLine().ToCharArray();
            bool b = true;
            if (a.Length > 2)
            {
                if ((test(a[0]) + test(a[1]))%26 != test(a[2])) b = false;
            }

            if (b) Console.WriteLine("YES");
            else Console.WriteLine("NO");
        }

        static int test(char a)
        {
            return (int)a - 65;
        }
    }
}


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

namespace CodeForcesAprilFoolsA
{
    class Program
    {
        static void Main(string[] args)
        {
            int num = int.Parse(Console.ReadLine());
            switch (num)
            {
                case 1: Console.WriteLine("Washington"); break;
                case 2: Console.WriteLine("Adams"); break;
                case 3: Console.WriteLine("Jefferson"); break;
                case 4: Console.WriteLine("Madison"); break;
                case 5: Console.WriteLine("Monroe"); break;
                case 6: Console.WriteLine("Adams"); break;
                case 7: Console.WriteLine("Jackson"); break;
                case 8: Console.WriteLine("Van Buren"); break;
                case 9: Console.WriteLine("Harrison"); break;
                case 10: Console.WriteLine("Tyler"); break;
                case 11: Console.WriteLine("Polk"); break;
                case 12: Console.WriteLine("Taylor"); break;
                case 13: Console.WriteLine("Fillmore"); break;
                case 14: Console.WriteLine("Pierce"); break;
                case 15: Console.WriteLine("Buchanan"); break;
                case 16: Console.WriteLine("Lincoln"); break;
                case 17: Console.WriteLine("Johnson"); break;
                case 18: Console.WriteLine("Grant"); break;
                case 19: Console.WriteLine("Hayes"); break;
                case 20: Console.WriteLine("Garfield"); break;
                case 21: Console.WriteLine("Arthur"); break;
                case 22: Console.WriteLine("Cleveland"); break;
                case 23: Console.WriteLine("Harrison"); break;
                case 24: Console.WriteLine("Cleveland"); break;
                case 25: Console.WriteLine("McKinley"); break;
                case 26: Console.WriteLine("Roosevelt"); break;
                case 27: Console.WriteLine("Taft"); break;
                case 28: Console.WriteLine("Wilson"); break;
                case 29: Console.WriteLine("Harding"); break;
                case 30: Console.WriteLine("Coolidge"); break;
                case 31: Console.WriteLine("Hoover"); break;
                case 32: Console.WriteLine("Roosevelt"); break;
                case 33: Console.WriteLine("Truman"); break;
                case 34: Console.WriteLine("Eisenhower"); break;
                case 35: Console.WriteLine("Kennedy"); break;
                case 36: Console.WriteLine("Johnson"); break;
                case 37: Console.WriteLine("Nixon"); break;
                case 38: Console.WriteLine("Ford"); break;
                case 39: Console.WriteLine("Carter"); break;
                case 40: Console.WriteLine("Reagan"); break;
                case 41: Console.WriteLine("Bush"); break;
                case 42: Console.WriteLine("Clinton"); break;
                case 43: Console.WriteLine("Bush"); break;
                case 44: Console.WriteLine("Obama"); break;

            }
            Console.Read();
        }
    }
}


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

class Program
{

    private static void Main(string[] args)
    {

        int a = RI(),b= RI();

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

        for(int i=1;i<=a;i++)
        {
            al.Add(RI());
        }

        var al1 = al.OrderByDescending(d=>d);

        foreach(var item in al1)
        {
            if(b%item==0)
            {
                Console.WriteLine(b / item);
                break;
            }
        }

    }

    private const int Mod = 1000000000 + 7;

    #region Data Read

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

    private static List<int>[] ReadTree(int n)
    {
        return ReadGraph(n, n - 1);
    }

    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 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 long RLI()
    {
        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 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 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] = RLI();
        return ans;
    }

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

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

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

        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()
    {
        consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);
    }
    #endregion
}


//Mono 5.10.1 | JDoodle.Com & Mono 5 | CodeForces.Com
using System;

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

        int grown_ups = Int32.Parse(input[0]);
        int children = Int32.Parse(input[1]);

        if (grown_ups < 1 & children > 0) {
            Console.Write("Impossible");
            return;
        }

        Console.Write("{0} {1}", grown_ups > children ? grown_ups : children, children != 0 ? grown_ups + children - 1 : grown_ups);
    }
}


using System;

namespace DataTypeApp{
   class Program{
      public static void Main(String[] Args){
         int T, n;
         T = Convert.ToInt32(Console.ReadLine());

         T = T*2;
         bool b = false;
         for(int i=1; i<T; i++){
            n = i*(i+1);
            if(n==T){ b = true;   break; }
            if(n>T){  break; }
         }
         if(b){   Console.WriteLine("YES\n");}
         else{ Console.WriteLine("NO\n"); }
      }
   }
}


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

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int one = 0;
            int zero = 0;
            //int n = Convert.ToInt32(Console.ReadLine());
            string s = Console.ReadLine();
            foreach(char ch in s)
            {
                if(ch == '0')
                {
                    zero++;
                    one = 0;
                }
                else
                {
                    one++;
                    zero = 0;
                }
                if(zero == 7 || one == 7)
                {
                    Console.WriteLine("YES");
                    return;
                }
            }
            Console.WriteLine("NO");
            Console.ReadLine();
        }
    }
}


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

namespace Olimp
{
    class Program
    {
        public static void Main(string[] arg)
        {
            int N = int.Parse(Console.ReadLine());
            string str = Console.ReadLine();
            List<char> alphabit = new List<char>();
            foreach (char c in str)
                if (!alphabit.Contains(char.ToLower(c)))
                    alphabit.Add(char.ToLower(c));
            if (alphabit.Count == 26)
                Console.WriteLine("YES");
            else Console.WriteLine("NO");
        }
    }
}


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

namespace CodeForces.Solutions.c321_190_1
{
	public class Program1
	{
		private static bool[,] f;
		const int offset = 150;

		public static bool IsInField (int x , int y)
		{
			return f[x + offset, y + offset];
		}

		static void SetInField(int x , int y)
		{
			f[x + offset, y + offset] = true;
		}

        public static void Main()
        {
            checked
            {
	            var str1 = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
	            var x = str1[0];
	            var y = str1[1];

	            var moves = Console.ReadLine();

	            var size = 2*offset + 1;
	            f = new bool[size,size];
	            SetInField(0, 0);
	            var dx = 0;
	            var dy = 0;

				foreach (var c in moves)
				{
					switch (c)
					{
						case 'U':
							dy++;
							break;
						case 'D':
							dy--;
							break;
						case 'R':
							dx++;
							break;
						case 'L':
							dx--;
							break;
					}
					SetInField(dx, dy);
				}

				if (x < -100 || x > 100)
				{
					if (x < -100 && dx >= 0)
					{
						Console.WriteLine("No");
						return;
					}
					if (x > 100 && dx <= 0)
					{
						Console.WriteLine("No");
						return;
					}

					var needToGoByX = x < 0 ? (-x - 100 - dx - 1) / -dx : (x - 100 + dx - 1) / dx;

					x -= needToGoByX * dx;
					y -= needToGoByX * dy;
				}

				if ((y < -100 || y > 100) && dx == 0)
				{
					if (y < -100 && dy >= 0)
					{
						Console.WriteLine("No");
						return;
					}
					if (y > 100 && dy <= 0)
					{
						Console.WriteLine("No");
						return;
					}

					var needToGo = y < 0 ? (-y - 100 - dy - 1) / -dy : (y - 100 + dy - 1) / dy;

					x -= needToGo * dx;
					y -= needToGo * dy;
				}

	            for (int i = 0; i < 1000; i++)
	            {
		            if (Math.Abs(x) <= 100 && Math.Abs(y) <= 100 && IsInField((int)x,(int) y))
		            {
			            Console.WriteLine("Yes");
						return;
		            }
		            x -= dx;
		            y -= dy;
	            }
				Console.WriteLine("No");
            }
        }
    }
}


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

namespace Candies
{
    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)
        {
            writer.WriteLine(Solve(args));
            writer.Flush();
        }

        private static long Solve(string[] args)
        {
            long n = long.Parse(reader.ReadLine());

            long l = 1, r = (n + 1)/2;
            while (l < r)
            {
                long m = (l + r)/2;

                long nn = n;
                long v = 0;
                while (nn > 0)
                {
                    long t = Math.Min(nn, m);
                    v += t;
                    nn -= t;
                    nn -= nn/10;
                }
                if (2*v >= n)
                {
                    r = m;
                }
                else
                {
                    l = m + 1;
                }
            }

            return r;
        }
    }
}


using System;

namespace Practice
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = (Console.ReadLine());
            Console.WriteLine(SolveProblem(s));
            Console.ReadLine();
        }

        static string SolveProblem (string s)
        {
            int lowerCount = 0;
            int higherCount = 0;
            for (int i = 0; i < s.Length ;i++)
            {
                if (char.IsLower( s [i]))
                {
                    lowerCount++;
                } else
                {
                    higherCount++;
                }

                if (lowerCount > (s.Length) / 2)
                {
                    return s.ToLower();
                }
            }
            return lowerCount == higherCount ? s.ToLower() :s.ToUpper();
        }

    }
}


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

namespace coder
{
    class Program
    {
        static void Main(string[] args)
        {
            byte[] inputBuffer = new byte[1024];
            System.IO.Stream inputStream = Console.OpenStandardInput(inputBuffer.Length);
            Console.SetIn(new StreamReader(inputStream, Console.InputEncoding, false, inputBuffer.Length));

            int n, m, index=0;
            int[] a = new int[101];
            string arr;
            bool b = false;
            string[] arr1 = Console.ReadLine().Split(new Char[] { ' ' });

            n = int.Parse(arr1[0]);
            m = int.Parse(arr1[1]);

            arr = Console.ReadLine();
            arr1 = Regex.Split(arr, " ");

            for (int i = 0; i < n; i++)
            {
                a[i] = int.Parse(arr1[i]);
            }

            while(!b)
            {
                for (int i = 0; i < n; i++)
                {
                    if(a[i]>0)
                    {
                        a[i] = a[i] - m;
                        index = i+1;
                        b = true;
                    }
                }
                if (b == false)
                {
                    b = true;
                }
                else { b = false; }
            }

            Console.WriteLine(index);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;
using static System.Console;
using static System.Convert;

//
class ProblemSolver
{
    const string STRINGTOREMOVE = "xxx";
    static void Main(string[] args)
    {
       int inputLen = ToInt32(ReadLine());

       string input = ReadLine();

       if(!string.IsNullOrWhiteSpace(input) && input.Length == inputLen)
       {
           int numberOfCharsToRemove = 0;
           int index = -1;
           while((index = input.IndexOf(STRINGTOREMOVE)) > -1)
           {
               input = input.Remove(index,1);
               numberOfCharsToRemove++;
           }

           Write(numberOfCharsToRemove);
       }
    }
}


using System;
using System.Collections.Generic;
namespace soutez1
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			string[] prvni = Console.ReadLine().Split();
			string[] hlasy = Console.ReadLine().Split();

			int n = int.Parse(prvni[0]);

			int nejvetsi  = 0;
			int soucet = 0;

			for( int a=0; a<hlasy.Length; a++)
			{
				if(nejvetsi < int.Parse(hlasy[a]))
				{
					nejvetsi = int.Parse(hlasy[a]);
				}
				soucet = soucet + int.Parse(hlasy[a]);
			}

			int dobryHlasy = n*nejvetsi - soucet;

			if( dobryHlasy > soucet)
			{

				Console.WriteLine(nejvetsi);
			}
			else
			{
				int vysledek = (soucet - dobryHlasy)/n + nejvetsi;
				if((vysledek* n - soucet) <= soucet )
				{
					vysledek++;
				}
				//vysledek = vysledek + nejvetsi;
				Console.WriteLine(vysledek);
			}

		}

	}
}
			/*int n = int.Parse(Console.ReadLine());
			string[] prvni = Console.ReadLine().Split();
			int zacatek = int.Parse(prvni[0]);
			int konec = int.Parse(prvni[1]);

			for(int a=1; a<n; a++)
			{
				string[] cisla = Console.ReadLine().Split();
				if( zacatek<int.Parse(cisla[0]))
				{
					zacatek = int.Parse(cisla[0]);
				}
				if( konec > int.Parse(cisla[1]))
				{
					konec = int.Parse(cisla[1]);
				}
			}
			if(zacatek> konec)
			{
				Console.WriteLine(0);
			}
			else
			{
				Console.WriteLine(konec-zacatek);
			}*/

			/*int n = int.Parse(Console.ReadLine());
			string[] cisla = Console.ReadLine().Split();

			int maximalni = 0;
			int aktualni = 1;

			for(int a=0; a+1<cisla.Length; a++)
			{
				if(int.Parse(cisla[a]) *2 >= int.Parse(cisla[a+1]))
				{
					aktualni++;
				}
				else
				{
					if(aktualni > maximalni)
					{
						maximalni = aktualni;

					}
					aktualni = 1;
				}
			}
			if(aktualni > maximalni)
			{
				maximalni = aktualni;

			}
			Console.WriteLine(maximalni); */

		/*
			int pocet = int.Parse(prvni[0]);
			int kolikrat = int.Parse(prvni[1]);
			string retezec = Console.ReadLine();

			string vysledek = "";

			for(int a=1; a<retezec.Length; a++)
			{
				if(retezec[a]== retezec[0])
				{
					bool c = true;
					for( int b = 0; a+b<retezec.Length; b++)
					{
						if(retezec[a+b] != retezec[b])
						{
							c = false;
						}
					}
					if(c)
					{
						int aktualnipocet =1;
						string vocas = retezec.Substring(retezec.Length-a);
						//string
						vysledek = retezec;
						while(aktualnipocet<kolikrat)
						{
							vysledek = vysledek+ vocas;
							aktualnipocet++;
						}
						Console.WriteLine (vysledek);
						return;
					}
				}
			}

			for(int a=0; a<kolikrat; a++)
			{
				vysledek = vysledek+retezec;
			}
			Console.WriteLine (vysledek);
			*/


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

namespace ConsoleApplicationOLIMP
{
    class Program
    {
        static int Main(string[] args)
        {
            int[] a = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
            int b;
            b = int.Parse(Console.ReadLine());
            Console.WriteLine(a[b % 10]*a[b / 10]);
            return 0;
        }
    }
}


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

namespace ConsoleApplication41
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int co = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (char.IsDigit(s[i]))
                {
                    int e = int.Parse(s[i] + "");
                    if (e%2!=0)
                    {
                        co++;
                    }
                }
                else
                {
                    if (s[i]=='a'||s[i]=='e'||s[i]=='i'||s[i]=='o'||s[i]=='u')
                    {
                        co++;
                    }
                }
            }
            Console.WriteLine(co);
        }
    }
}


using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace CF253
{
    struct Card
    {
        public int Color, Num;

        public Card(int color, string num)
        {
            Color = color;
            Num = int.Parse(num) - 1;
        }
    }
    class C
    {
        readonly int[] _bad = { ' ', '\r', '\n' };

        private string NextToken()
        {
            var sb = new StringBuilder();
            int i;

            while (Array.IndexOf(_bad, (i = Console.Read())) != -1)
            {
            }
            sb.Append((char)i);

            while (Array.IndexOf(_bad, (i = Console.Read())) == -1)
            {
                sb.Append((char)i);
            }
            return sb.ToString();
        }

        int NextInt()
        {
            return int.Parse(NextToken());
        }

        private void run()
        {
            var n = NextInt();
            var h = new Dictionary<char, int>();
            h.Add('R', 0);
            h.Add('G', 1);
            h.Add('B', 2);
            h.Add('Y', 3);
            h.Add('W', 4);
            var s = "";
            var pairs = Enumerable.Range(0, n).Select(x => new Card(h[(s = NextToken())[0]], s.Substring(1, 1))).ToArray();
            pairs = pairs.Distinct().ToArray();
            n = pairs.Length;
            var min = 239;
            for (var m1 = 0; m1 < 1 << 5; ++m1)
            {
                var num = Enumerable.Range(0, 5).Select(x => (m1 & (1 << x)) > 0).ToArray();
                for (var m2 = 0; m2 < 1 << 5; ++m2)
                {
                    var color = Enumerable.Range(0, 5).Select(x => (m2 & (1 << x)) > 0).ToArray();
                    var good = true;
                    for (var i = 0; i < n; ++i)
                        for (var j = 0; j < i; ++j)
                        {
                            var g = pairs[i].Color != pairs[j].Color && (color[pairs[i].Color] || color[pairs[j].Color]) ||
                                     pairs[i].Num != pairs[j].Num && (num[pairs[i].Num] || num[pairs[j].Num]);
                            if (!g)
                                good = false;
                        }
                    var sum = num.Sum(x => x ? 1 : 0) + color.Sum(x => x ? 1 : 0);
                    if (good && sum < min)
                        min = sum;
                }
            }
            Console.Write(min);
        }
        static void Main(string[] args)
        {
            new C().run();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
//using mystruct = System.Int64;

public sealed class Solution : Helper
{
    //
    public void __main(int _TCID = 1)
    {
        checked
        {
            //
            readWordString();
            var s = readWordString().ToCharArray();
            var n = s.Length;
            var upb = n - 1;
            //
            var res = new ValueRefPointer<long>();
            res.ValueNullable = n;
            seq(1, upb).TakeWhile(i => countLength(0, i - 1) <= countLength(i, upb)).elect(i =>
              {
                  if (seq(0, i - 1).Select(a => s[a]).SequenceEqual(seq(i, getRight(i, countLength(0, i - 1))).Select(b => s[b])))
                      res.UpdateCompute(1 + i + (n - i - countLength(0, i - 1)), Math.Min);
              });
            writeNumber(res.ValueNullable ?? 1);
            //
        }
        writeLine();
    }
    //
}

// additional plugable library
public partial class Helper
{
    //
    static bool MULTI_TCs = false;
    #region STDIO
#if !DEBUG
    static void Main() { __stdioMain(); }
#endif
    static void __stdioMain()
    {
        Console.SetIn(new System.IO.StreamReader(new System.IO.BufferedStream(Console.OpenStandardInput())));
        Console.SetOut(new System.IO.StreamWriter(new System.IO.BufferedStream(Console.OpenStandardOutput())));
        var cnt = MULTI_TCs ? int.Parse(Console.ReadLine()) : 1;
        for (var i = 1; i <= cnt; i++) new Solution().__main(i);
        Console.Out.Flush();
    }
    // OUTput
    internal string separatorAutoString;
    internal void writeLine() { Console.WriteLine(); }
    internal void writeSeparator() { if (!string.IsNullOrEmpty(separatorAutoString)) { Console.Write(separatorAutoString); } }
    internal void writeText(char c) { Console.Write(c); writeSeparator(); }
    internal void writeText(string s) { Console.Write(s); writeSeparator(); }
    internal void writeNumber(long i64) { Console.Write(i64); writeSeparator(); }
    internal void writeNumber(int i32) { Console.Write(i32); writeSeparator(); }
    internal void writeNumber(double dec) { Console.Write(dec); writeSeparator(); }
    // INput
    static void EOF() { throw new System.IO.EndOfStreamException(); }
    static IEnumerable<char> stream() { while (true) { var iread = Console.Read(); if (iread < 0) break; yield return (char)iread; } }
    static bool isWhitespace(char c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t'; }
    static System.Text.StringBuilder sb = new System.Text.StringBuilder(30);
    internal static string readWordString()
    {
        sb.Clear();
        var iter = stream().SkipWhile(isWhitespace).TakeWhile(c => !isWhitespace(c));
        foreach (var c in iter) sb.Append(c);
        if (sb.Length == 0) EOF(); return sb.ToString();
    }
    internal static long readLong64() { return long.Parse(readWordString()); }
    internal static char readSingleChar() { return stream().SkipWhile(isWhitespace).First(); }
    #endregion
    //
    internal class ValueRefPointer<T> where T : struct
    {
        public T? ValueNullable;
        public ValueRefPointer<T> IfAbsent(Action<ValueRefPointer<T>> init) { if (ValueNullable == null) init(this); return this; }
        public ValueRefPointer<T> UpdateIfAbsent(Func<T> calc) { if (ValueNullable == null) ValueNullable = calc(); return this; }
        public ValueRefPointer<T> UpdateCompute(T other, Func<T, T, T> merge_CHECKED) { var ans = other; if (ValueNullable.HasValue) ans = merge_CHECKED(other, ValueNullable.Value); ValueNullable = ans; return this; }
        public ValueRefPointer<T> UpdateCompute(T? other, Func<T, T, T> merge_CHECKED) { if (other.HasValue) UpdateCompute(other.Value, merge_CHECKED); return this; }
        public ValueRefPointer<T> Swap(ValueRefPointer<T> with) { var temp = ValueNullable; ValueNullable = with.ValueNullable; with.ValueNullable = temp; return this; }
        //TODO switch to implicit cast from ValueRefPointer to T?
        public ValueRefPointer<T> UpdateCompute(ValueRefPointer<T> other, Func<T, T, T> merge_CHECKED) { return UpdateCompute(other.ValueNullable, merge_CHECKED); }
        public override string ToString() { return ValueNullable.ToString(); }
    }
}
static partial class Extension
{
    //

    //
}

#region Core helper library
[DebuggerNonUserCode]
public partial class Helper
{
    internal static IEnumerable<long> seq(long low, long high, int skip = 1) { checked { for (var i = low; i <= high; i += skip) yield return i; } }
    internal static IEnumerable<long> rev(long low, long high, int skipPositive = 1) { checked { for (var i = high; i >= low; i -= skipPositive) yield return i; } }
    internal static T[] collect<T>(params T[] elemS) { return elemS; }
    internal static T? optional<T>(bool hasValue, T value) where T : struct { return hasValue ? new T?(value) : null; }
    internal static T identity<T>(T obj) { return obj; }
    internal static T? optional<T>(T value) where T : struct { return value; }
    internal static void assert(bool truthy) { if (!truthy) { var a = 0; a /= a; } }
    internal static void assert<T>(T actual, T expected) { if (!Equals(actual, expected)) { Debug.WriteLine("SALAH {0} / BENAR {1}", actual, expected); assert(false); } }
    [Conditional("DEBUG")]
    internal static void debug(bool truthy) { Debug.Assert(truthy); }
    internal static List<T> ll<T>(T emptyExample) { return new List<T>(); }
    internal static T? optional<T>(bool hasValue, Func<T> calc) where T : struct { return hasValue ? calc() : new T?(); }
    internal static long countLength(long left, long right) { return left > right ? 0 : checked(right - left + 1); }
    internal static long getRight(long left, long count) { return checked(left + count - 1); }
    internal static long getLeft(long count, long right) { return checked(right - count + 1); }
    static double div(double a, double b) { return a / b; }
}
[DebuggerNonUserCode]
static partial class Extension
{
    internal static IEnumerable<T> elect<T>(this IEnumerable<T> stream, Action<T> act) { foreach (var elem in stream) act(elem); return stream; }
    internal static IEnumerable<T> Select<T>(this long count, Func<T> getter) { while (count-- > 0) yield return getter(); }
    internal static void elect(this long count, Action act) { while (count-- > 0) act(); }
    internal static List<KeyValuePair<int, T>> ToKvpList<T>(this IEnumerable<T> list) { return list.Select((elem, idx) => new KeyValuePair<int, T>(idx, elem)).ToList(); }
    internal static IEnumerable<T> SelectElement<T>(this IEnumerable<long> indices, IList<T> lst) { return indices.Select(Convert.ToInt32).Select(i => lst[i]); }
    internal static int int32(this long val) { return Convert.ToInt32(val); }
    internal static long long64(this int val) { return val; }
    internal static T? optional<T>(this T value) where T : struct { return value; }
    internal static IEnumerable<T?> optional<T>(this IEnumerable<T> stream) where T : struct { return stream.Select(optional); }
    internal static long skip(this long src, long skipSigned) { return checked(src + skipSigned); }
    //
    internal static T? AggregateOrNullable<T>(this IEnumerable<T> stream, Func<T, T, T> merge_CHECKED) where T : struct
    { var it = stream.GetEnumerator(); if (!it.MoveNext()) return null; var res = it.Current; while (it.MoveNext()) res = merge_CHECKED(res, it.Current); return res; }
    internal static long sumLong64(IEnumerable<int> stream) { return stream.Sum(x => (long)x); }
    internal static int? explainSearchIndex(this int rawIndex) { if (rawIndex < 0) return null; return rawIndex; }
    internal static T[] ll<T>(this IEnumerable<T> stream) { return stream.ToArray(); }
    internal static T[] sort<T>(this T[] arr) { Array.Sort(arr); return arr; }
    internal static List<T> sort<T>(this List<T> lst) { lst.Sort(); return lst; }
    //internal static IEnumerable<int> seq<T>(this IList<T> list) { for (var i = 0; i < list.Count; i++) yield return i; }
    //internal static IEnumerable<int> rev<T>(this IList<T> list) { for (var i = list.Count - 1; i >= 0; i--) yield return i; }
    internal static int getUpperBound<T>(this IList<T> list) { return list.Count - 1; }
    internal static int GetUpperBound(this System.Collections.IList list) { return list.Count - 1; }
    internal static T? elementAtOrNullable<T>(this IList<T> list, int index) where T : struct { if (index < 0 || index >= list.Count) return null; return list[index]; }
    internal static string stringify(this IEnumerable<char> stream) { return new string(stream.ToArray()); }
}
#endregion


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

namespace _743B_Хлоя_и_последовательность
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] Enter = Console.ReadLine().Split(' ');
            byte n = Convert.ToByte(Enter[0]);
            long k = Convert.ToInt64(Enter[1]);

            long Kol =Convert.ToInt64( Math.Pow(2 , n))-1;
            byte ans = 0;
            byte Count = 0;
            while (ans==0)
            {
                Kol = (Kol+1) / 2;
                if (Kol == k) { ans = (byte)(n - Count); }
                else if (k > Kol) { k = k - Kol; }
                Count += 1;
                if (Count > n) { ans = 1; }
                //Console.WriteLine(Count + " - " +(Kol) + " - "  + k);
                Kol -=1;
            }
            Console.WriteLine(ans);
            //Console.ReadKey();
        }
    }
}


using System;

class Program
{
    static void Main()
    {
        string s = Console.ReadLine();
        int val = Convert.ToInt32(Console.ReadLine());
        string[] all = new string[val];
        for (int i = 0; i < val; i++)
        {
            all[i] = Console.ReadLine();
        }
        for (int i = 0; i < val; i++)
        {
            for (int j = 0; j < val; j++)
            {
                if ((all[i] + all[j]).Contains(s))
                {
                    Console.WriteLine("YES");
                    return;
                }
            }
        }
        Console.WriteLine("NO");
    }
}


using System;

namespace ConsoleApplication1
{
    internal class Program
    {
        private static int n;
        private static string[] s;
        private static int[] a;
        private static int x = 0, y = 0, z = 0;

        private static void Main(string[] args)
        {
            n = int.Parse(Console.ReadLine());

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

            var k = 1;

            for (int i = 0; i < n; i++)
            {
                switch (k)
                {
                    case 1 :
                        x += int.Parse(s[i]);
                        break;
                    case 2:
                        y += int.Parse(s[i]);
                        break;
                    case 3:
                        z += int.Parse(s[i]);
                        break;
                }

                if (k == 3)
                    k = 1;
                else
                    k++;
            }

            Console.WriteLine(x > y ? x > z ? "chest" : "back" : y > z ? "biceps" : "back");
        }
    }
}