Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeForces", "CodeForces\CodeForces.csproj", "{50F6CA0F-3B5E-48D3-9012-35DFCE5D35A1}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x86 = Debug|x86
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{50F6CA0F-3B5E-48D3-9012-35DFCE5D35A1}.Debug|x86.ActiveCfg = Debug|x86
		{50F6CA0F-3B5E-48D3-9012-35DFCE5D35A1}.Debug|x86.Build.0 = Debug|x86
		{50F6CA0F-3B5E-48D3-9012-35DFCE5D35A1}.Release|x86.ActiveCfg = Release|x86
		{50F6CA0F-3B5E-48D3-9012-35DFCE5D35A1}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            //int a = int.Parse(Console.ReadLine());
            string j = Console.ReadLine();
            int[] a = new int[j.Length];
            int sum = 0;
            for (int i = 0; i < j.Length; i++)
            {
                if (j[i] == 'A')
                    a[i] = 1;
                else if (j[i] == 'B')
                    a[i] = 2;
                else if (j[i] == 'C')
                    a[i] = 3;

            }
            bool l = false;
            for (int i = 0; i < j.Length; i++)
            {
                if (a[i] + a[i + 1] + a[i + 2] == 6)
                {
                    if ((a[i] != 0) && (a[i + 1] != 0) && (a[i + 2] != 0))
                    {
                        l = true;
                    }
                }

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


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

namespace CodeForces_1
{
    class Program
    {

        public static void Main()
        {
            string input = System.Console.ReadLine();
            int cnt = 0;
            for(int i = 0 ; i < input.Length ; i++)
            {
                if (input.ElementAt(i) != '.')
                    cnt++;
                else
                    cnt = 0;
                if(cnt == 3)
                {
                    System.Console.WriteLine("Yes");
                    return;
                }
            }
            System.Console.WriteLine("No");

        }

    }
}


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

namespace Temp
{
    struct PointInt
    {
        public long X;

        public long Y;

        public PointInt(long x, long y)
            : this()
        {
            this.X = x;
            this.Y = y;
        }

        public static PointInt operator +(PointInt a, PointInt b)
        {
            return new PointInt(a.X + b.X, a.Y + b.Y);
        }

        public static PointInt operator -(PointInt a, PointInt b)
        {
            return new PointInt(a.X - b.X, a.Y - b.Y);
        }

        public static PointInt operator *(PointInt a, long k)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public static PointInt operator *(long k, PointInt a)
        {
            return new PointInt(k * a.X, k * a.Y);
        }

        public bool IsInsideRectangle(long l, long b, long r, long t)
        {
            return (l <= X) && (X <= r) && (b <= Y) && (Y <= t);
        }
    }

    struct LineInt
    {
        public LineInt(PointInt a, PointInt b)
            : this()
        {
            A = a.Y - b.Y;
            B = b.X - a.X;
            C = a.X * b.Y - a.Y * b.X;
        }

        public long A, B, C;

        public bool ContainsPoint(PointInt p)
        {
            return A * p.X + B * p.Y + C == 0;
        }
    }

    class MatrixInt
    {
        private long[,] m_Matrix;

        public int Size
        {
            get
            {
                return m_Matrix.GetLength(0) - 1;
            }
        }

        public long Mod { get; private set; }

        public MatrixInt(int size, long mod = 0)
        {
            m_Matrix = new long[size + 1, size + 1];
            Mod = mod;
        }

        public MatrixInt(long[,] matrix, long mod = 0)
        {
            this.m_Matrix = matrix;
            Mod = mod;
        }

        public static MatrixInt GetIdentityMatrix(int size, long mod = 0)
        {
            long[,] matrix = new long[size + 1, size + 1];

            for (int i = 1; i <= size; i++)
            {
                matrix[i, i] = 1;
            }

            return new MatrixInt(matrix, mod);
        }

        public long this[int i, int j]
        {
            get
            {
                return m_Matrix[i, j];
            }

            set
            {
                m_Matrix[i, j] = value;
            }
        }

        public static MatrixInt operator +(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);
            long[,] c = new long[n, n];
            for (int i = 1; i <= n; i++)
            {
                for (int j = 1; j <= n; j++)
                {
                    c[i, j] = a[i, j] + b[i, j];
                }
            }

            if (mod > 0)
            {
                for (int i = 1; i <= n; i++)
                {
                    for (int j = 1; j <= n; j++)
                    {
                        c[i, j] %= mod;
                    }
                }
            }

            return new MatrixInt(c, mod);
        }

        public static MatrixInt operator *(MatrixInt a, MatrixInt b)
        {
            int n = a.Size;
            long mod = Math.Max(a.Mod, b.Mod);

            long[,] c = new long[n, n];

            for (int i = 1; i <= n; i++)
            {
                for (int j = 1; j <= n; j++)
                {
                    for (int k = 1; k <= n; k++)
                    {
                        c[i, j] += a[i, k] * b[k, j];
                        if (mod > 0)
                        {
                            c[i, j] %= mod;
                        }
                    }
                }
            }

            return new MatrixInt(c, mod);
        }
    }

    static class Algebra
    {
        public static long Phi(long n)
        {
            long result = n;
            for (long i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    while (n % i == 0)
                    {
                        n /= i;
                    }

                    result -= result / i;
                }
            }

            if (n > 1)
            {
                result -= result / n;
            }

            return result;
        }

        public static long BinPower(long a, long n, long mod)
        {
            long result = 1;

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result = (result * a) % mod;
                }

                a = (a * a) % mod;
                n >>= 1;
            }

            return result;
        }

        public static class Permutations
        {
            public static int[] GetRandomPermutation(int n)
            {
                int[] p = new int[n];
                for (int i = 0; i < n; i++)
                {
                    p[i] = i;
                }

                Random random = new Random();
                for (int i = n - 1; i > 0; i--)
                {
                    int j = random.Next(i + 1);
                    int tmp = p[i];
                    p[i] = p[j];
                    p[j] = tmp;
                }

                return p;
            }
        }

        public static T[] Shuffle<T>(this T[] array)
        {
            int length = array.Length;
            int[] p = Permutations.GetRandomPermutation(length);
            T[] result = new T[length];
            for (int i = 0; i < length; i++)
            {
                result[i] = array[p[i]];
            }

            return result;
        }

        public static MatrixInt MatrixBinPower(MatrixInt a, long n)
        {
            MatrixInt result = new MatrixInt(a.Size);

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result *= a;
                }

                a *= a;
                n >>= 1;
            }

            return result;
        }

        public static long Gcd(long a, long b)
        {
            return b == 0 ? a : Gcd(b, a % b);
        }

        public static long ExtendedGcd(long a, long b, out long x, out long y)
        {
            if (b == 0)
            {
                x = 1;
                y = 0;
                return a;
            }

            long x1;
            long y1;
            long d = ExtendedGcd(b, a % b, out x1, out y1);
            x = y1;
            y = x1 - (a / b) * y1;
            return d;
        }

        public static long Lcm(long a, long b)
        {
            return (a / Gcd(a, b)) * b;
        }

        public static bool[] GetPrimes(int n)
        {
            n = Math.Max(n, 2);
            bool[] prime = new bool[n + 1];
            for (int i = 2; i <= n; i++)
            {
                prime[i] = true;
            }

            for (int i = 2; i * i <= n; i++)
            {
                if (prime[i])
                {
                    if ((long)i * i <= n)
                    {
                        for (int j = i * i; j <= n; j += i)
                        {
                            prime[j] = false;
                        }
                    }
                }
            }

            return prime;
        }

        public static long GetFibonacciNumber(long n, long mod = 0)
        {
            long[,] matrix = new long[,] { { 0, 0, 0 }, { 0, 0, 1 }, { 0, 1, 1 } };

            MatrixInt result = MatrixBinPower(new MatrixInt(matrix, mod), n);

            return result[2, 2];
        }

        public static long[] GetFibonacciSequence(int n)
        {
            long[] result = new long[n];
            result[0] = result[1] = 1;

            for (int i = 2; i < n; i++)
            {
                result[i] = result[i - 1] + result[i - 2];
            }

            return result;
        }

        public static long GetInverseElement(long a, long mod)
        {
            long x, y;
            long g = ExtendedGcd(a, mod, out x, out y);

            if (g != 1)
            {
                return -1;
            }

            return ((x % mod) + mod) % mod;
        }

        public static long[] GetAllInverseElements(long mod)
        {
            long[] result = new long[mod];
            result[1] = 1;
            for (int i = 2; i < mod; i++)
            {
                result[i] = (mod - (((mod / i) * result[mod % i]) % mod)) % mod;
            }

            return result;
        }
    }

    internal static class Reader
    {
        public static void ReadInt(out int a)
        {
            int[] number = new int[1];
            ReadInt(number);
            a = number[0];
        }

        public static void ReadInt(out int a, out int b)
        {
            int[] numbers = new int[2];
            ReadInt(numbers);
            a = numbers[0];
            b = numbers[1];
        }

        public static void ReadInt(out int int1, out int int2, out int int3)
        {
            int[] numbers = new int[3];
            ReadInt(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
        }

        public static void ReadInt(out int int1, out int int2, out int int3, out int int4)
        {
            int[] numbers = new int[4];
            ReadInt(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
            int4 = numbers[3];
        }

        public static void ReadLong(out long a)
        {
            long[] number = new long[1];
            ReadLong(number);
            a = number[0];
        }

        public static void ReadLong(out long a, out long b)
        {
            long[] numbers = new long[2];
            ReadLong(numbers);
            a = numbers[0];
            b = numbers[1];
        }

        public static void ReadLong(out long int1, out long int2, out long int3)
        {
            long[] numbers = new long[3];
            ReadLong(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
        }

        public static void ReadLong(out long int1, out long int2, out long int3, out long int4)
        {
            long[] numbers = new long[4];
            ReadLong(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
            int4 = numbers[3];
        }

        public static void ReadInt(int[] numbers)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            int count = Math.Min(numbers.Length, list.Length);

            for (int i = 0; i < count; i++)
            {
                numbers[i] = int.Parse(list[i]);
            }
        }

        public static int[] ReadDigits()
        {
            // ReSharper disable AssignNullToNotNullAttribute
            return Console.ReadLine().Select(x => int.Parse(x.ToString())).ToArray();
            // ReSharper restore AssignNullToNotNullAttribute
        }

        public static void ReadLong(long[] numbers)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            int count = Math.Min(numbers.Length, list.Length);

            for (int i = 0; i < count; i++)
            {
                numbers[i] = long.Parse(list[i]);
            }
        }

        public static void ReadDouble(double[] numbers)
        {
            // ReSharper disable PossibleNullReferenceException
            var list = Console.ReadLine().Split();
            // ReSharper restore PossibleNullReferenceException

            int count = Math.Min(numbers.Length, list.Length);

            for (int i = 0; i < count; i++)
            {
                numbers[i] = double.Parse(list[i]);
            }
        }

        public static void ReadDouble(out double a, out double b)
        {
            double[] numbers = new double[2];
            ReadDouble(numbers);
            a = numbers[0];
            b = numbers[1];
        }

        public static void ReadDouble(out double int1, out double int2, out double int3)
        {
            double[] numbers = new double[3];
            ReadDouble(numbers);
            int1 = numbers[0];
            int2 = numbers[1];
            int3 = numbers[2];
        }

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

    static class MyMath
    {
        public static int GetMinimalPrimeDivisor(int n)
        {
            for (int i = 2; i * i <= n; i++)
            {
                if (n % i == 0)
                {
                    return i;
                }
            }

            return n;
        }

        public static long Sqr(long x)
        {
            return x * x;
        }
    }

    public interface IGraph
    {
        int Vertices  { get; set; }

        IList<int> this[int i] { get; }

        void AddEdge(int u, int v);

        void AddOrientedEdge(int u, int v);
    }

    public class Graph : IGraph
    {
        private List<int>[] m_Edges;

        public int Vertices { get; set; }

        public IList<int> this[int i]
        {
            get
            {
                return this.m_Edges[i];
            }
        }

        public Graph(int vertices)
        {
            this.Vertices = vertices;

            this.m_Edges = new List<int>[vertices];

            for (int i = 0; i < vertices; i++)
            {
                this.m_Edges[i] = new List<int>();
            }
        }

        public void AddEdge(int u, int v)
        {
            this.AddOrientedEdge(u, v);
            this.AddOrientedEdge(v, u);
        }

        public void AddOrientedEdge(int first, int second)
        {
            this.m_Edges[first].Add(second);
        }

        public int[] Bfs(int start)
        {
            int[] d = new int[Vertices];
            for (int i = 0; i < Vertices; i++)
            {
                d[i] = -1;
            }

            Queue<int> queue = new Queue<int>();
            queue.Enqueue(start);
            d[start] = 0;

            while (queue.Count > 0)
            {
                int v = queue.Dequeue();
                foreach (int t in this.m_Edges[v].Where(t => d[t] == -1))
                {
                    queue.Enqueue(t);
                    d[t] = d[v] + 1;
                }
            }

            return d;
        }
    }

    class SimpleSumTable
    {
        private readonly int[,] m_Sum;

        public SimpleSumTable(int n, int m, int[,] table)
        {
            m_Sum = new int[n + 1, m + 1];

            for (int i = 1; i < n + 1; i++)
            {
                for (int j = 1; j < m + 1; j++)
                {
                    m_Sum[i, j] = m_Sum[i, j - 1] + m_Sum[i - 1, j] - m_Sum[i - 1, j - 1] + table[i, j];
                }
            }
        }

        public int GetSum(int l, int b, int r, int t)
        {
            return m_Sum[r, t] - m_Sum[r, b] - m_Sum[l, t] + m_Sum[l, b];
        }
    }

    class SegmentTreeSimpleInt<T>
    {
        public int Size { get; private set; }

        private readonly T[] m_Tree;

        private Func<T, T, T> m_Operation;

        private T m_Null;

        public SegmentTreeSimpleInt(int size, Func<T, T, T> operation, T nullElement, IList<T> array = null)
        {
            this.Size = size;
            this.m_Operation = operation;
            this.m_Null = nullElement;

            m_Tree = new T[4 * size];
            if (array != null)
            {
                this.Build(array, 1, 0, size - 1);
            }
        }

        private void Build(IList<T> array, int v, int tl, int tr)
        {
            if (tl == tr)
            {
                m_Tree[v] = array[tl];
            }
            else
            {
                int tm = (tl + tr) / 2;
                this.Build(array, 2 * v, tl, tm);
                this.Build(array, 2 * v + 1, tm + 1, tr);
                this.CalculateNode(v);
            }
        }

        public T GetSum(int l, int r)
        {
            return GetSum(1, 0, Size - 1, l, r);
        }

        private T GetSum(int v, int tl, int tr, int l, int r)
        {
            if (l > r)
            {
                return m_Null;
            }

            if (l == tl && r == tr)
            {
                return m_Tree[v];
            }

            int tm = (tl + tr) / 2;

            return this.m_Operation(GetSum(2 * v, tl, tm, l, Math.Min(r, tm)),GetSum(2 * v + 1, tm + 1, tr, Math.Max(l, tm + 1), r));
        }

        public void Update(int pos, T newValue)
        {
            Update(1, 0, Size - 1, pos, newValue);
        }

        private void Update(int v, int tl, int tr, int pos, T newValue)
        {
            if (tl == tr)
            {
                m_Tree[v] = newValue;
            }
            else
            {
                int tm = (tl + tr) / 2;
                if (pos <= tm)
                {
                    Update(2 * v, tl, tm, pos, newValue);
                }
                else
                {
                    Update(2 * v + 1, tm + 1, tr, pos, newValue);
                }
                this.CalculateNode(v);
            }
        }

        private void CalculateNode(int v)
        {
            m_Tree[v] = this.m_Operation(m_Tree[2 * v], m_Tree[2 * v + 1]);
        }
    }

    struct Pair<TFirst, TSecond>
    {
        public Pair(TFirst first, TSecond second)
            : this()
        {
            this.First = first;
            this.Second = second;
        }

        public TFirst First { set; get; }

        public TSecond Second { set; get; }
    }

    class Program
    {
        private static StreamReader m_InputStream;

        private static StreamWriter m_OutStream;

        private static void OpenFiles()
        {
            m_InputStream = File.OpenText("input.txt");
            Console.SetIn(m_InputStream);

            m_OutStream = File.CreateText("output.txt");
            Console.SetOut(m_OutStream);
        }

        private static void CloseFiles()
        {
            m_OutStream.Flush();

            m_InputStream.Dispose();
            m_OutStream.Dispose();
        }

        static void Main()
        {
            //OpenFiles();

            new Solution().Solve();

            //CloseFiles();
        }
    }

    internal class Solution
    {
        private int[,,,] pos;

        private Card[] cards;

        public void Solve()
        {
            int n;
            Reader.ReadInt(out n);

            cards = new Card[n];

            string s = Reader.ReadLine();
            var split = s.Split();
            for (int i = 0; i < n; i++)
            {
                cards[i] = new Card(split[i], i);
            }

            pos = new int[n + 1,n,n,n];

            Console.Write(this.IsPossible(n, n - 3, n - 2, n - 1) == 1 ? "YES" : "NO");
        }

        private int IsPossible(int n, int a, int b, int c)
        {
            if (n == 1)
            {
                return 1;
            }

            if (n == 2)
            {
                return this.Compatible(cards[b], cards[c]) ? 1 : 2;
            }

            if (pos[n, a, b, c] != 0)
            {
                return pos[n, a, b, c];
            }

            if (this.Compatible(cards[b], cards[c]) && this.IsPossible(n - 1, n - 4, a, c) == 1 ||
                n > 3 && this.Compatible(cards[n - 4], cards[c]) && this.IsPossible(n - 1, c, a, b) == 1)
            {
                pos[n, a, b, c] = 1;
                return 1;
            }
            else
            {
                pos[n, a, b, c] = 2;
                return 2;
            }
        }

        class Card
        {
            public Card(string card, int id)
            {
                Value = int.Parse(card[0].ToString());
                Suit = card[1];
                Id = id;
            }

            public int Value;

            public char Suit;

            public int Id;
        }

        private bool Compatible(Card a, Card b)
        {
            return a.Value == b.Value || a.Suit == b.Suit;
        }
    }
}


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

namespace krokb
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine(), r="";
            if (s[0] == 'h')
            {
                r += "http://";
                s=s.Substring(4, s.Length-4);
            }
            else
            {
                r += "ftp://";
                s=s.Substring(4, s.Length-3);
            }
           for (int i=1; i<s.Length-2; i++)
                if (s[i]=='r' && s[i+1]=='u')
                {
                    r += s.Substring(0, i) + ".ru/" + s.Substring(i+2, s.Length-i-2);
                    s="";
                    break;
                }
            if (s!="" && s.Substring(s.Length - 2, 2) == "ru")
                r += s.Substring(0, s.Length - 2) + ".ru";
            Console.WriteLine(r);
        }
    }
}


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

namespace Solution {

    class Solution {

        class StdIn {
            int currPos = 0;
            string[] tokens = new string[0];

            private string getNextToken() {
                if (currPos < tokens.Length) return tokens[currPos++];
                currPos = 0;
                tokens = Console.ReadLine().Split(new char[] { ' ', '\t', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
                return tokens[currPos++];
            }

            public int nextInt() {
                return int.Parse(getNextToken());
            }

            public string nextString() {
                return getNextToken();
            }

            public double nextDouble() {
                return double.Parse(getNextToken());
            }

            public long nextLong() {
                return long.Parse(getNextToken());
            }
        }

        public static void swap<T>(ref T a, ref T b) {
            T c = a;
            a = b;
            b = c;
        }

        static int countPowers(int p, int n) {
            int result = 0;
            int curr = 1;
            while (n / p >= curr) {
                ++result;
                curr *= p;
            }
            return result;
        }

        static Dictionary<int, int> D = new Dictionary<int, int>();

        static int bitmask(ref List<int> p) {
            int result = 0;
            for (int i = 0; i < p.Count; ++i)
                result = 2 * result + p[i];
            return result;
        }

        static int fun(ref List<int> p) {
            if (D.ContainsKey(bitmask(ref p))) {
                return D[bitmask(ref p)];
            }
            HashSet<int> s = new HashSet<int>();
            for (int i = 0; i < p.Count; ++i) if (p[i] == 1) {
                List<int> n = new List<int>(p);
                for (int j = 0; j < n.Count; ++j) if ((j + 1) % (i + 1) == 0) n[j] = 0;
                s.Add(fun(ref n));
            }
            int result = 0;
            while (s.Contains(result)) ++result;
            D[bitmask(ref p)] = result;
            return result;
        }

        static int getSprague(int len) {
            // SG for group of powers
            D.Clear();
            D[0] = 0;

            List<int> p = new List<int>();
            for (int i = 0; i < len; ++i) p.Add(1);
            return fun(ref p);
        }

        public static void Main(string[] args) {
            StdIn std = new StdIn();

            int n = std.nextInt();

            int ans = 0;

            int totcnt = n;

            for (int i = 2; i * i <= n; ++i) {
                int cnt = countPowers(i, n);
                totcnt -= cnt;
                ans ^= getSprague(cnt);
            }

            if (totcnt % 2 > 0) ans ^= 1;

            if (ans > 0) Console.WriteLine("Vasya");
            else Console.WriteLine("Petya");

            //Console.ReadLine();
        }
    }
}


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

namespace Solution {

    class Solution {

        class StdIn {
            int currPos = 0;
            string[] tokens = new string[0];

            private string getNextToken() {
                if (currPos < tokens.Length) return tokens[currPos++];
                currPos = 0;
                tokens = Console.ReadLine().Split(new char[] { ' ', '\t', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
                return tokens[currPos++];
            }

            public int nextInt() {
                return int.Parse(getNextToken());
            }

            public string nextString() {
                return getNextToken();
            }

            public double nextDouble() {
                return double.Parse(getNextToken());
            }

            public long nextLong() {
                return long.Parse(getNextToken());
            }
        }

        public static void swap<T>(ref T a, ref T b) {
            T c = a;
            a = b;
            b = c;
        }

        static int countPowers(int p, int n) {
            int result = 0;
            int curr = 1;
            while (n / p >= curr) {
                ++result;
                curr *= p;
                Used.Add(curr);
            }
            return result;
        }

        static HashSet<int> Used = new HashSet<int>();
        static Dictionary<int, int> D = new Dictionary<int, int>();

        static int bitmask(ref List<int> p) {
            int result = 0;
            for (int i = 0; i < p.Count; ++i)
                result = 2 * result + p[i];
            return result;
        }

        static int fun(ref List<int> p) {
            if (D.ContainsKey(bitmask(ref p))) {
                return D[bitmask(ref p)];
            }
            HashSet<int> s = new HashSet<int>();
            for (int i = 0; i < p.Count; ++i) if (p[i] == 1) {
                List<int> n = new List<int>(p);
                for (int j = 0; j < n.Count; ++j) if ((j + 1) % (i + 1) == 0) n[j] = 0;
                s.Add(fun(ref n));
            }
            int result = 0;
            while (s.Contains(result)) ++result;
            D[bitmask(ref p)] = result;
            return result;
        }

        static int getSprague(int len) {
            if (len == 2) return 2;
            // SG for group of powers
            D.Clear();
            D[0] = 0;

            List<int> p = new List<int>();
            for (int i = 0; i < len; ++i) p.Add(1);
            //Console.WriteLine(len + " " + fun(ref p));
            return fun(ref p);
        }

        public static void Main(string[] args) {
            StdIn std = new StdIn();

            int n = std.nextInt();

            int ans = 0;

            int totcnt = n;

            for (int i = 2; i * i <= n; ++i) if (!Used.Contains(i)) {
                int cnt = countPowers(i, n);
                totcnt -= cnt;
                ans ^= getSprague(cnt);
            }

            if (totcnt % 2 > 0) ans ^= 1;

            if (ans > 0) Console.WriteLine("Vasya");
            else Console.WriteLine("Petya");

            //Console.ReadLine();
        }
    }
}


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

namespace _5Dproblem
{
    class vector
    {
        private int[] points= new int[5];
        private double length ;

        public vector(Point R,Point D)
        {
            for (int i = 0; i < 5; i++)
            {
                points[i] = R.coordinates[i]-D.coordinates[i];
            }
            length = Math.Sqrt(vector.CrossProduct(this, this));
        }

        public double GetLength()
        {
            return length;
        }
        static public double CrossProduct(vector A,vector B)
        {
            double product = 0;
            product = A.points[0] * B.points[0]
                + A.points[1] * B.points[1]
                + A.points[2] * B.points[2]
                + A.points[3] * B.points[3]
                + A.points[4] * B.points[4];
            return product;
        }
        public static double GetAngle(vector A,vector B)
        {
            double angle = vector.CrossProduct(A, B) / (A.length * B.length);
            return Math.Acos(angle)*180/Math.PI;
        }
    }
    class Point
    {
        public int[] coordinates = new int[5];
        List<vector> V = new List<vector>();//vectors from this point
        List<double> angles = new List<double>();
        public Point (int[] p)
        {
            for (int i = 0; i < 5; i++)
            {
                coordinates[i] = p[i];
            }
        }
        private vector GetVector(Point p)
        {
            {
                vector v = new vector(this,p);
                return v;
            }
        }
        public void set_vectList(List<Point> Point)
        {
            for (int i = 0; i < Point.Count; i++)
            {
                if (this != Point[i])
                    V.Add(GetVector(Point[i]));
            }
        }
        public void set_angleList()
        {
            for (int i = 0; i < V.Count; i++)
            {
                for (int j = i+1; j < V.Count; j++)
                {
                    angles.Add(vector.GetAngle(V[i], V[j]));
                }
            }
        }
        public bool Isgood()
        {
            foreach (var a in angles)
            {
                if (a < 90)
                    return false;
            }
            return true;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            if (n > 10)
            {
                for (int i = 0; i < n; i++)
                {
                    Console.ReadLine();
                }

                Console.WriteLine(0);
            }
            else
            {
                List<Point> lp = new List<Point>();
                int[] count = new int[n];
                int c = 0;
                for (int i = 0; i < n; i++)
                {
                    Point p = new Point(Array.ConvertAll(Console.ReadLine().Split(), int.Parse));
                    lp.Add(p);
                }

                foreach (var point in lp)
                {
                    point.set_vectList(lp);
                    point.set_angleList();
                    if (point.Isgood())
                        count[c]++;
                    c++;
                }
                Console.WriteLine(count.Sum());
                for (int i = 0; i < count.Length; i++)
                {
                    if (count[i] != 0)
                        Console.WriteLine(i + 1);
                }
            }
        }
    }
}


using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
class Solve{
    public Solve(){}
    StringBuilder sb;
    ReadData re;
    public static int Main(){
        new Solve().Run();
        return 0;
    }
    void Run(){
        sb = new StringBuilder();
        re = new ReadData();
        Calc();
        Console.Write(sb.ToString());
    }
    void Calc(){
        long H = re.l();
        long W = re.l();
        if(H == 1 || W == 1){
            H = Math.Max(H,W);
            long count = H / 6 * 6;
            if(H % 6 == 4){
                count += 2;
            }
            if(H % 6 == 5){
                count += 4;
            }
            sb.Append(count + "\n");
            return;
        }
        if(H >= 3 && W >= 3){
            sb.Append(H*W/2*2+"\n");
            return;
        }
        if(H != 2){
            W = H;
            H = 2;
        }
        if(W == 2){
            sb.Append("0\n");
            return;
        }
        sb.Append((W/2*4)+"\n");
    }
}
class PrimeFactor{
    int[] LowestPrimeFactor;
    public int[] Prime;
    int N;
    public PrimeFactor(int N0){
        N = N0;
        N++;
        LowestPrimeFactor = new int[N];
        List<int> prime = new List<int>();
        for(int i=1;i<N;i++){
            LowestPrimeFactor[i] = i;
        }
        for(int i=2;i<N;i++){
            if(LowestPrimeFactor[i] == i){
                prime.Add(i);
            }
            for(int j=0;j<prime.Count;j++){
                if(prime[j]*i < N && prime[j] <= LowestPrimeFactor[i]){
                    LowestPrimeFactor[prime[j]*i] = prime[j];
                }
                else{
                    break;
                }
            }
        }
        Prime = prime.ToArray();
    }
    public int[] PrimeDivide(int X){
        List<int> ans = new List<int>();
        while(X != 1){
            ans.Add(LowestPrimeFactor[X]);
            X /= LowestPrimeFactor[X];
        }
        return ans.ToArray();
    }
    public int[] PrimeDivide(long X0){
        List<int> ans = new List<int>();
        int X = (int)X0;
        int i=0;
        while(X >= N){
            if(X % Prime[i] == 0){
                ans.Add(Prime[i]);
                X /= Prime[i];
            }
            else{
                i++;
                if(i == Prime.Length){
                    ans.Add(X);
                    X = 1;
                }
            }
        }
        while(X != 1){
            ans.Add(LowestPrimeFactor[X]);
            X /= LowestPrimeFactor[X];
        }
        return ans.ToArray();
    }
    public int[] Divisor(int X){
        List<int> ans = new List<int>();
        ans.Add(1);
        while(X != 1){
            int p = LowestPrimeFactor[X];
            int c = 0;
            while(X % p == 0){
                X /= p;
                c++;
            }
            int l = ans.Count;
            int d = p;
            for(int i=1;i<=c;i++){
                for(int j=0;j<l;j++){
                    ans.Add(d*ans[j]);
                }
                d *= p;
            }
        }
        return ans.ToArray();
    }
    public int[] Divisor(long X0){
        List<int> ans = new List<int>();
        int X = (int)X0;
        ans.Add(1);
        int i=0;
        while(X >= N){
            if(X % Prime[i] == 0){
                int p = Prime[i];
                int c = 0;
                while(X % p == 0){
                    X /= p;
                    c++;
                }
                int l = ans.Count;
                int d = p;
                for(int k=1;k<=c;k++){
                    for(int j=0;j<l;j++){
                        ans.Add(d*ans[j]);
                    }
                    d *= p;
                }
            }
            else{
                i++;
                if(i == Prime.Length){
                    int l = ans.Count;
                    for(int j=0;j<l;j++){
                        ans.Add(X*ans[j]);
                    }
                    X = 1;
                }
            }
        }
        while(X != 1){
            int p = LowestPrimeFactor[X];
            int c = 0;
            while(X % p == 0){
                X /= p;
                c++;
            }
            int l = ans.Count;
            int d = p;
            for(int k=1;k<=c;k++){
                for(int j=0;j<l;j++){
                    ans.Add(d*ans[j]);
                }
                d *= p;
            }
        }
        return ans.ToArray();
    }
    public int Phi(int X){
        int ans = X;
        while(X != 1){
            int p = LowestPrimeFactor[X];
            while(X % p == 0){
                X /= p;
            }
            ans /= p;
            ans *= p-1;
        }
        return ans;
    }
    public int Phi(long X0){
        int ans = (int)X0;
        int X = (int)X0;
        int i=0;
        while(X >= N){
            if(X % Prime[i] == 0){
                int p = Prime[i];
                while(X % p == 0){
                    X /= p;
                }
                ans /= p;
                ans *= p-1;
            }
            else{
                i++;
                if(i == Prime.Length){
                    int p = X;
                    ans /= p;
                    ans *= p-1;
                    X = 1;
                }
            }
        }
        while(X != 1){
            int p = LowestPrimeFactor[X];
            while(X % p == 0){
                X /= p;
            }
            ans /= p;
            ans *= p-1;
        }
        return ans;
    }
}
class ReadData{
    string[] str;
    int counter;
    public ReadData(){
        counter = 0;
    }
    public string s(){
        if(counter == 0){
            str = Console.ReadLine().Split(' ');
            counter = str.Length;
        }
        counter--;
        return str[str.Length-counter-1];
    }
    public int i(){
        return int.Parse(s());
    }
    public long l(){
        return long.Parse(s());
    }
    public double d(){
        return double.Parse(s());
    }
    public int[] ia(int N){
        int[] ans = new int[N];
        for(int j=0;j<N;j++){
            ans[j] = i();
        }
        return ans;
    }
    public int[] ia(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        int[] ans = new int[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = int.Parse(str[j]);
        }
        return ans;
    }
    public long[] la(int N){
        long[] ans = new long[N];
        for(int j=0;j<N;j++){
            ans[j] = l();
        }
        return ans;
    }
    public long[] la(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        long[] ans = new long[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = long.Parse(str[j]);
        }
        return ans;
    }
    public double[] da(int N){
        double[] ans = new double[N];
        for(int j=0;j<N;j++){
            ans[j] = d();
        }
        return ans;
    }
    public double[] da(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        double[] ans = new double[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = double.Parse(str[j]);
        }
        return ans;
    }
    public List<int>[] g(int N,int[] f,int[] t){
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<f.Length;j++){
            ans[f[j]].Add(t[j]);
            ans[t[j]].Add(f[j]);
        }
        return ans;
    }
    public List<int>[] g(int N,int M){
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<M;j++){
            int f = i()-1;
            int t = i()-1;
            ans[f].Add(t);
            ans[t].Add(f);
        }
        return ans;
    }
    public List<int>[] g(){
        int N = i();
        int M = i();
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<M;j++){
            int f = i()-1;
            int t = i()-1;
            ans[f].Add(t);
            ans[t].Add(f);
        }
        return ans;
    }
}
public static class Define{
    public const long mod = 1000000007;
}
public static class Debug{
    public static void Print(double[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(double[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(double[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
    public static void Print(long[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(long[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(long[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
    public static void Print(int[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(int[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(int[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
}


using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
class Solve{
    public Solve(){}
    StringBuilder sb;
    ReadData re;
    public static int Main(){
        new Solve().Run();
        return 0;
    }
    void Run(){
        sb = new StringBuilder();
        re = new ReadData();
        Calc();
        Console.Write(sb.ToString());
    }
    void Calc(){
        long H = re.l();
        long W = re.l();
        if(H == 1 || W == 1){
            H = Math.Max(H,W);
            long count = H / 6 * 6;
            if(max % 6 == 4){
                count += 2;
            }
            if(max % 6 == 5){
                count += 4;
            }
            sb.Append(count + "\n");
            return;
        }
        if(H >= 3 && W >= 3){
            sb.Append(H*W/2*2+"\n");
            return;
        }
        if(H != 2){
            W = H;
            H = 2;
        }
        if(W == 2){
            sb.Append("0\n");
            return;
        }
        long count = W/2*4;
        sb.Append(count+"\n");
    }
}
class PrimeFactor{
    int[] LowestPrimeFactor;
    public int[] Prime;
    int N;
    public PrimeFactor(int N0){
        N = N0;
        N++;
        LowestPrimeFactor = new int[N];
        List<int> prime = new List<int>();
        for(int i=1;i<N;i++){
            LowestPrimeFactor[i] = i;
        }
        for(int i=2;i<N;i++){
            if(LowestPrimeFactor[i] == i){
                prime.Add(i);
            }
            for(int j=0;j<prime.Count;j++){
                if(prime[j]*i < N && prime[j] <= LowestPrimeFactor[i]){
                    LowestPrimeFactor[prime[j]*i] = prime[j];
                }
                else{
                    break;
                }
            }
        }
        Prime = prime.ToArray();
    }
    public int[] PrimeDivide(int X){
        List<int> ans = new List<int>();
        while(X != 1){
            ans.Add(LowestPrimeFactor[X]);
            X /= LowestPrimeFactor[X];
        }
        return ans.ToArray();
    }
    public int[] PrimeDivide(long X0){
        List<int> ans = new List<int>();
        int X = (int)X0;
        int i=0;
        while(X >= N){
            if(X % Prime[i] == 0){
                ans.Add(Prime[i]);
                X /= Prime[i];
            }
            else{
                i++;
                if(i == Prime.Length){
                    ans.Add(X);
                    X = 1;
                }
            }
        }
        while(X != 1){
            ans.Add(LowestPrimeFactor[X]);
            X /= LowestPrimeFactor[X];
        }
        return ans.ToArray();
    }
    public int[] Divisor(int X){
        List<int> ans = new List<int>();
        ans.Add(1);
        while(X != 1){
            int p = LowestPrimeFactor[X];
            int c = 0;
            while(X % p == 0){
                X /= p;
                c++;
            }
            int l = ans.Count;
            int d = p;
            for(int i=1;i<=c;i++){
                for(int j=0;j<l;j++){
                    ans.Add(d*ans[j]);
                }
                d *= p;
            }
        }
        return ans.ToArray();
    }
    public int[] Divisor(long X0){
        List<int> ans = new List<int>();
        int X = (int)X0;
        ans.Add(1);
        int i=0;
        while(X >= N){
            if(X % Prime[i] == 0){
                int p = Prime[i];
                int c = 0;
                while(X % p == 0){
                    X /= p;
                    c++;
                }
                int l = ans.Count;
                int d = p;
                for(int k=1;k<=c;k++){
                    for(int j=0;j<l;j++){
                        ans.Add(d*ans[j]);
                    }
                    d *= p;
                }
            }
            else{
                i++;
                if(i == Prime.Length){
                    int l = ans.Count;
                    for(int j=0;j<l;j++){
                        ans.Add(X*ans[j]);
                    }
                    X = 1;
                }
            }
        }
        while(X != 1){
            int p = LowestPrimeFactor[X];
            int c = 0;
            while(X % p == 0){
                X /= p;
                c++;
            }
            int l = ans.Count;
            int d = p;
            for(int k=1;k<=c;k++){
                for(int j=0;j<l;j++){
                    ans.Add(d*ans[j]);
                }
                d *= p;
            }
        }
        return ans.ToArray();
    }
    public int Phi(int X){
        int ans = X;
        while(X != 1){
            int p = LowestPrimeFactor[X];
            while(X % p == 0){
                X /= p;
            }
            ans /= p;
            ans *= p-1;
        }
        return ans;
    }
    public int Phi(long X0){
        int ans = (int)X0;
        int X = (int)X0;
        int i=0;
        while(X >= N){
            if(X % Prime[i] == 0){
                int p = Prime[i];
                while(X % p == 0){
                    X /= p;
                }
                ans /= p;
                ans *= p-1;
            }
            else{
                i++;
                if(i == Prime.Length){
                    int p = X;
                    ans /= p;
                    ans *= p-1;
                    X = 1;
                }
            }
        }
        while(X != 1){
            int p = LowestPrimeFactor[X];
            while(X % p == 0){
                X /= p;
            }
            ans /= p;
            ans *= p-1;
        }
        return ans;
    }
}
class ReadData{
    string[] str;
    int counter;
    public ReadData(){
        counter = 0;
    }
    public string s(){
        if(counter == 0){
            str = Console.ReadLine().Split(' ');
            counter = str.Length;
        }
        counter--;
        return str[str.Length-counter-1];
    }
    public int i(){
        return int.Parse(s());
    }
    public long l(){
        return long.Parse(s());
    }
    public double d(){
        return double.Parse(s());
    }
    public int[] ia(int N){
        int[] ans = new int[N];
        for(int j=0;j<N;j++){
            ans[j] = i();
        }
        return ans;
    }
    public int[] ia(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        int[] ans = new int[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = int.Parse(str[j]);
        }
        return ans;
    }
    public long[] la(int N){
        long[] ans = new long[N];
        for(int j=0;j<N;j++){
            ans[j] = l();
        }
        return ans;
    }
    public long[] la(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        long[] ans = new long[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = long.Parse(str[j]);
        }
        return ans;
    }
    public double[] da(int N){
        double[] ans = new double[N];
        for(int j=0;j<N;j++){
            ans[j] = d();
        }
        return ans;
    }
    public double[] da(){
        str = Console.ReadLine().Split(' ');
        counter = 0;
        double[] ans = new double[str.Length];
        for(int j=0;j<str.Length;j++){
            ans[j] = double.Parse(str[j]);
        }
        return ans;
    }
    public List<int>[] g(int N,int[] f,int[] t){
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<f.Length;j++){
            ans[f[j]].Add(t[j]);
            ans[t[j]].Add(f[j]);
        }
        return ans;
    }
    public List<int>[] g(int N,int M){
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<M;j++){
            int f = i()-1;
            int t = i()-1;
            ans[f].Add(t);
            ans[t].Add(f);
        }
        return ans;
    }
    public List<int>[] g(){
        int N = i();
        int M = i();
        List<int>[] ans = new List<int>[N];
        for(int j=0;j<N;j++){
            ans[j] = new List<int>();
        }
        for(int j=0;j<M;j++){
            int f = i()-1;
            int t = i()-1;
            ans[f].Add(t);
            ans[t].Add(f);
        }
        return ans;
    }
}
public static class Define{
    public const long mod = 1000000007;
}
public static class Debug{
    public static void Print(double[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(double[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(double[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
    public static void Print(long[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(long[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(long[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
    public static void Print(int[,,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                for(int l=0;l<k.GetLength(2);l++){
                    Console.Write(k[i,j,l]+" ");
                }
                Console.WriteLine();
            }
            Console.WriteLine();
        }
    }
    public static void Print(int[,] k){
        for(int i=0;i<k.GetLength(0);i++){
            for(int j=0;j<k.GetLength(1);j++){
                Console.Write(k[i,j]+" ");
            }
            Console.WriteLine();
        }
    }
    public static void Print(int[] k){
        for(int i=0;i<k.Length;i++){
            Console.WriteLine(k[i]);
        }
    }
}


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

namespace CodeForces
{
    internal class Program
    {
        private static void Main()
        {
            var count = ReadHelper.ReadLong();
            var str2 = ReadHelper.ReadString();
            var lastColor = '';
            var result = 0;
            foreach (var ch in str2)
            {
                if (ch == lastColor)
                    result++;
                else
                    lastColor = ch;
            }
            Console.WriteLine(result);
        }
    }

    internal static class ReadHelper
    {

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

        public static List<long> ReadLongList()
        {
            return Console.ReadLine().Trim().Split().Select(long.Parse).ToList();
        }
        public static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }
    }

}


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

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            var j = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
            int a = j.ElementAt(0);
            int b = j.ElementAt(1);
            int c = j.ElementAt(2);
            int ans = a / 3 + b / 3 + c / 3;
            if ((a > 0) && (b > 0) && (c > 0))
            {
                ans=Math.Max(ans,(a-1)/3+(b-1)/3+(c-1)/3)+1);
            }
            if ((a > 1) && (b > 1) && (c > 1))
            {
                ans=Math.Max(ans,(a-2)/3+(b-2)/3+(c-2)/3)+2);
            }
            Console.WriteLine(ans);

        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string in_s = Console.ReadLine();
            string[] pra = in_s.Split(' ');
            int redNum = Convert.ToInt32(pra[0]);
            int greenNum = Convert.ToInt32(pra[1]);
            int yellowNum = Convert.ToInt32(pra[2]);
            int ans = 0;
            for (int i = 0; i <= 2; i++)
            {
                int slo = i;
                slo += (redNum - i) / 3;
                slo += (greenNum - i) / 3;
                slo += (yellowNum - i) / 3;
                if (slo > ans) ans = slo;
            }
            Console.WriteLine(ans);
            while (true) ;

        }
    }
}


#if DEBUG
using System.Reflection;
using System.Threading.Tasks;
#endif

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

namespace _308c
{
    class Program
    {
        static string _inputFilename = "input.txt";
        static string _outputFilename = "output.txt";
        static bool _useFileInput = false;

        static void Main(string[] args)
        {
            StreamWriter file = null;
#if DEBUG
			Console.SetIn(getInput());
#else
            if (_useFileInput)
            {
                Console.SetIn(File.OpenText(_inputFilename));
                file = new StreamWriter(_outputFilename);
                Console.SetOut(file);
            }
#endif

            try
            {
                solution();
            }
            finally
            {
                if (_useFileInput)
                {
                    file.Close();
                }
            }
        }

        static void solution()
        {
            #region SOLUTION
            var d = readIntArray();
            var w = d[0];
            var m = d[1];
            var val = new int[101];
            var i = 1;
            while (true)
            {
                if (m == 0)
                {
                    break;
                }

                var rem = m % w;
                val[i] = rem;
                i++;
                m /= w;
            }

            var av = new bool[101];
            for (int j = 1; j < 101; j++)
            {
                av[j] = true;
            }

            for (int j = 1; j < 101; j++)
            {
                if (val[j] == 0 || val[j] == 1)
                {
                    continue;
                }

                if (val[j] < w - 2)
                {
                    Console.WriteLine("NO");
                    return;
                }

                if (val[j] == w - 2)
                {
                    if (j == 100)
                    {
                        Console.WriteLine("NO");
                        return;
                    }

                    if (!av[j - 1])
                    {
                        Console.WriteLine("NO");
                        return;
                    }

                    av[j - 1] = false;
                    av[j] = false;
                    val[j + 1]++;
                }

                if (val[j] == w - 1)
                {
                    if (j == 100)
                    {
                        Console.WriteLine("NO");
                        return;
                    }

                    av[j] = false;
                    val[j + 1]++;
                }
            }

            Console.WriteLine("YES");

            //for (int j = 1; j < 101; j++)
            //{

            //}

            //var n = readInt();
            //var m = readInt();

            //var a = readIntArray();
            //var b = readIntArray();
            #endregion
        }

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

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

        static int[] readIntArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();
        }

        static long[] readLongArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();
        }

#if DEBUG
		static StreamReader getInput()
		{
			var resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];
			var resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);

			return new StreamReader(resource);
		}
#endif
    }
}


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

namespace Vladik_and_Courtesy
{
    public static class Operações
    {
        static public string Doces; //Recebe o valor solicitado no começo da quantidade de doces que cada um tem

        static public void EntregaDoces()
        {
            //Separando a quantidade de doces pra cada um
            string[] separados = Doces.Split(' ');
            double vladik = double.Parse(separados[0]);
            double valera = double.Parse(separados[1]);
            string entrega = "vladik";

            //Instanciando um contador que define quantos doces cada um deve dar
            int cont = 1;

            while (vladik >= cont || valera >= cont) //Condição de que enquanto a quantidade de doces que um tem seja menor que a quantidade que ele deve dar
            {
                if (entrega == "vladik" && vladik >= cont)
                { //Se o contador for ímpar, o vladik deve dar o doce
                    vladik -= cont; //Vladik entrega a quantidade de doces definida no contador
                    entrega = "valera";
                }
                else if (entrega == "valera" && valera >= cont)
                { //Senão, a Valera deve dar o doce
                    valera -= cont; //Valera entrega a quantidade de doces definida no contador
                    entrega = "vladik";
                }
                cont++; //Soma um valor no contador
            }

            Exibe(vladik, valera, cont, entrega); //Função pra exibir o nome de quem não pode dar a quantidade de doces definida
        }

        static private void Exibe(double vladik, double valera, int cont, string entrega)
        {
            if (entrega == "vladik") //Se Vladik não tiver a quantidade, exibe o nome dele
                Console.WriteLine("Vladik");
            else //Senão, O nome da Valera é exibida
                Console.WriteLine("Valera");
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Menu(); //Chamando o método para exibir a entrada
            Operações.EntregaDoces(); //Método para realizar a distribuição entre eles
        }

        static void Menu()
        {
            Operações.Doces = Console.ReadLine(); //Colocando o valor dentro do objeto
        }
    }
}


<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{CA709FE1-A7B9-416E-8ACA-32B55CB0CB31}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>Olimp</RootNamespace>
    <AssemblyName>Olimp</AssemblyName>
    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="App.config" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>


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

namespace Introduction
{

    class Program
    {
        static Reader reader = new Reader();
        static void Main(string[] args)
        {
            int number1 = reader.NextInt();
            int number2 = reader.NextInt();
            int count = 0,count1=0;
            int i = 1, j = 1;
            while(number1!=number2)
            {
                number1++;
                count += i++;
                if(number1!=number2)
                {
                    count1 += j++;
                    number2--;
                }
            }
            Console.Write(count+count1);
        }
    }

    #region Reader Class
    internal class Reader
    {
        int s_index = 0;
        List<string> s_tokens;

        public string Next()
        {
            while (s_tokens == null || s_index == s_tokens.Count)
            {
                s_tokens = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
                s_index = 0;
            }
            return s_tokens[s_index++];
        }

        public int NextInt()
        {
            String s = Next();

            return int.Parse(s);
        }

        public long NextLong()
        {
            String s = Next();

            return long.Parse(s);
        }

        public bool HasNext()
        {
            while (s_tokens == null || s_index == s_tokens.Count)
            {
                s_tokens = null;
                s_index = 0;
                var nextLine = Console.ReadLine();
                if (nextLine != null)
                {
                    s_tokens = nextLine.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
                    if (s_tokens.Count == 0)
                    {
                        continue;
                    }
                }
                return false;
            }
            return false;
        }
    }
    #endregion
}


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

namespace LongPath
{
    public class Problem417A
    {
        public static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var c = input[0];
            var d = input[1];

            input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var n = input[0];
            var m = input[1];

            var k = int.Parse(Console.ReadLine());

            var mainpp = c / n;

            var count = 0;
            var candidates = n * m - k;

            while (candidates > 0)
            {
                if (int(c / n) <= d)
                {
                    count += c;
                    candidates -= n;
                }
                else {
                    count += d;
                    candidates--;
                }
            }

            Console.WriteLine(count);
        }
    }
}


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

namespace LongPath
{
    public class Problem417A
    {
        public static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var c = input[0];
            var d = input[1];

            input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var n = input[0];
            var m = input[1];

            var k = int.Parse(Console.ReadLine());

            var mainpp = c / n;

            var count = 0;
            var candidates = n * m - k;

            while (candidates > 0)
            {
                if (candidates >= n)
                {
                    //if (Math.Floor((double)(c / n)) <= d)
                    //{
                    //    count += c;
                    //    candidates -= n;
                    //}
                    //else
                    //{
                    //    count += d;
                    //    candidates--;
                    //}
                }
                else
                {
                    if (d * Math.Min(candidates, n) > c)
                    {
                        count += c;
                        candidates -= n;
                    }
                    else
                    {
                        count += d * candidates;
                        candidates = 0;
                    }
                }
            }

            Console.WriteLine(count);
        }
    }
}


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

namespace rcc2014warmup_div2_a
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split(' ');
            int c = int.Parse(str[0]);
            int d = int.Parse(str[1]);
            str = Console.ReadLine().Split(' ');
            int n = int.Parse(str[0]);
            int m = int.Parse(str[1]);
            str = Console.ReadLine().Split(' ');
            int k = int.Parse(str[0]);

            int min = 0;
            if (k < n * m)
            {
                min = int.MaxValue;
                for (int i = 0; i <= m; i++)
                {
                    int j = 0;
                    do
                    {
                        if ((i * n + j + k >= n * m) && (min > ((i * c) + (j * d)))) min = (i * c) + (j * d);
                    } while (j <= m - k);
                }
            }

            Console.WriteLine(min);
            Console.ReadLine();
        }
    }
}


using System;
using System.Linq;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            Solve();
        }

        static void Solve()
        {
            int[] data = Console.ReadLine().Split(' ').Select(t => int.Parse(t)).ToArray();
            int max = 0;
            for(int i = 0; i < data.Length; i++)
            {
                var sum = Score(Redistribute(data, i));
                if (sum > max) max = sum;
            }
            Console.WriteLine(max);
        }

        static int[] Redistribute(int[] arr, int pos)
        {
            var result = new int[arr.Length];
            Array.Copy(arr, result, arr.Length);
            int s = arr[pos];
            result[pos] = 0;
            var each = s / arr.Length;
            s = s % arr.Length;
            for(int i = 0; i < arr.Length; i++)
            {
                int idx = (i + pos + 1) % arr.Length;
                result[idx] += each;
                if (i < s) result[idx]++;
            }
            return result;
        }

        static int Score(int[] arr)
        {
            return arr.Where(t => t % 2 == 0).Sum();
        }
    }
}


using System;
using System.Linq;

namespace Mancala
{
    class Program
    {
        static void Main(string[] args)
        {
            var stoneStrings = Console.ReadLine().Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries);
            var stoneData = stoneStrings.Select(int.Parse).ToArray();
            var maximum = 0;

            for (var i = 0; i < 14; i++)
            {
                var points = SimulateMove(stoneData, i);
                if (points > maximum)
                {
                    maximum = points;
                }
            }

            Console.Write(maximum);
        }

        static int SimulateMove(int[] stoneDataIn, int index)
        {
            var stoneData = (int[])stoneDataIn.Clone();

            var stones = stoneData[index];
            stoneData[index] = 0;

            for (var i = index + 1; i < index + 1 + stones; i++)
            {
                var goodIndex = i % 14;
                stoneData[goodIndex]++;
            }

            return CalcPoints(stoneData);
        }

        static int CalcPoints(int[] stoneData)
        {
            var points = 0;

            foreach (var i in stoneData)
            {
                if (i % 2 == 0)
                {
                    points += i;
                }
            }

            return points;
        }
    }
}


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

public class Mancala {

        private int[] ParseNumbers(string input) {

            return Regex.Matches(input, @"\d+").Cast<Match>().Select(match => int.Parse(match.Value)).ToArray();
        }

        private int CountScore(int[] stones, int slot) {

            int total = stones[slot];
            stones[slot] = 0;

            for(int i = total; i > 0; i--) {

                slot = (slot + 1) % stones.Length;
                stones[slot]++;
            }

            return stones.Where(hole => hole % 2 == 0).Sum();
        }

        public int GetMaxScore(string input) {

            var stones = ParseNumbers(input);
            int max = 0;

            for(int i = 0; i < 14; i++) {

                if(stones[i] != 0) {

                    max = Math.Max(CountScore(stones.ToArray(), i), max);
                }
            }

            return max;
        }
    }

    public class Program {

        static void Main(string[] args) {

            string line1 = Console.ReadLine().Trim();

            Console.WriteLine(new Mancala().GetMaxScore(line1));
        }
    }


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

public class Mancala {

        private int[] ParseNumbers(string input) {

            return Regex.Matches(input, @"\d+").Cast<Match>().Select(match => int.Parse(match.Value)).ToArray();
        }

        private decimal CountScore(int[] stones, int slot) {

            int total = stones[slot];
            stones[slot] = 0;
            int rounds = total / stones.Length;
            total -= rounds * stones.Length;

            for(int i = 0; i < stones.Length; i++) {

                stones[i] += rounds;
            }

            for(int i = total; i > 0; i--) {

                slot = (slot + 1) % stones.Length;
                stones[slot]++;
            }

            return stones.Where(hole => hole % 2 == 0).Sum();
        }

        public decimal GetMaxScore(string input) {

            var stones = ParseNumbers(input);
            decimal max = 0;

            for(int i = 0; i < stones.Length; i++) {

                if(stones[i] != 0) {

                    max = Math.Max(CountScore(stones.ToArray(), i), max);
                }
            }

            return max;
        }
    }

public class Program {

        static void Main(string[] args) {

            string line1 = Console.ReadLine().Trim();

            Console.WriteLine(new Mancala().GetMaxScore(line1));
        }
    }


class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            if (str.Contains("Q")||str.Contains("H")||str.Contains("9"))
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }
    }


class Program
    {
        static void Main(string[] args)
        {
            string q = Console.ReadLine();
            if (q.Contains("H")|| q.Contains("Q") || q.Contains("9") )
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }


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

public class Program
{
	public static void Main()
	{
		string str=Console.ReadLine();
		if(str.Contains("H") || str.Contains("h") || str.Contains("Q") || str.Contains("q") || str.Contains("9")
			Console.WriteLine("YES");
		else
			Console.WriteLine("NO");
	}
}


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

namespace A.HQ9+
{
    class Program
    {
        static void Main(string[] args)
        {

            string sa = Console.ReadLine();
            if (sa.Contains("H")||sa.Contains("Q")||sa.Contains("9"))
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}


using System;

namespace CP14HQ
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            if(a.Contains("H") || a.Contains("Q") || a.Contains("9"))
            {
                Console.WriteLine("YES");
            }
            else if(a.Contains("+"))
            {
                int ind = a.IndexOf('+');
                if(a.IndexOf('+') ==a.Length-1)
                {
                    Console.WriteLine("NO");
                }
                else if(char.IsDigit(a[ind-1]) || char.IsLetter(a[ind-1]))
                {
                    Console.WriteLine("NO");
                }
                else
                {
                    Console.WriteLine("YES");
                }
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}


using System;

class Program{
    static void Main(){
        string str = Console.ReadLine();
        foreach(char i in str){
            if(i == 'H' || i == 'Q' || i = '9' || '+') Console.WriteLine("YES");
            return;
        }
        Console.WriteLine("NO");
    }
}


using System;

public class CodeForces
{
    public static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        int[] c = new int[n];
        for (int i = 0; i < n; ++i)
        {
            c[i] = 1;
        }
        while (n > 1)
        {
            for (int i = 1; i < n; ++i)
            {
                c[i] = c[i - 1] + c[i];
            }
            --n;
        }
        return c[n - 1];
    }
}


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

namespace _2_2
{
    class Program
    {
        static void Main(string[] args)
        {
            string a, b;
            a = Console.ReadLine();
            b = Console.ReadLine();
            int x=0;
            int y=0;
            for(int i=0; i<a.Length; i++){
                x+=(int)a[i].ToString().ToLower();
                y+=(int)b[i].ToString().ToLower();
            }

            if(x<y){ Console.WriteLine("-1");}
            else if(x==y) { Console.WriteLine("0");}
            else {Console.WriteLine("1");}
        }
    }
}


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

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();         // boje papira na nakitu
            int br = 0;
            int brr = 0;
            string sm = string.Format("{0:00}", s.Substring(s.Length - 2));
            string sh = string.Format("{0:00}", s.Substring(0,2));

            for (int i = Int32.Parse(sh, NumberStyles.Any); i < 24; i++)
            {

                brr++;
                if (brr > 1)
                    sm = "00";

                var h = string.Format("{0:00}", i);
                for (int j = Int32.Parse(sm, NumberStyles.Any); j < 60; j++)
                {
                    var m = string.Format("{0:00}", j);
                    char[] arr = h.ToCharArray();
                    char[] arr1 = m.ToCharArray();
                    Array.Reverse(arr);
                    br++;
                    string s0 = new string(arr);
                    string s1 = new string(arr1);
                    if (i == 23)
                    {
                     i= -1;
                    }
                    if (s0 == s1)
                    {
                        Console.WriteLine(br-1);
                        goto Foo;
                    }

                }
            }

            Foo:

        }
    }

}


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

class Startup
{
    static void Main()
    {
        List<int> liTime = Console.ReadLine().Split(':').Select(int.Parse).ToList();

        int iHour = liTime[0];
        int iMin = liTime[1];
        int iCounter = 0;
        TimeSpan tsCheck;

        while( ReverseInt(iHour)!=iMin)
        {
            iCounter++;
            iMin++;

            tsCheck= new TimeSpan(iHour, iMin, 0);

            iHour = tsCheck.Hours;
            iMin = tsCheck.Minutes;
        }

        Console.WriteLine(iCounter);

    }

    public static int ReverseInt(int myVal)
    {
        int result = 0;
        while (myVal > 0)
        {
            result = result * 10 + myVal % 10;
            myVal /= 10;
        }

        return result;
    }
}