Problem:
Score : 100 points

Problem Statement

You are given two integers A and B.
Find the largest value among A+B, A-B and A \times B.

Constraints

-1000 \leq A,B \leq 1000

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the largest value among A+B, A-B and A \times B.

Sample Input 1

3 1

Sample Output 1

4

3+1=4, 3-1=2 and 3 \times 1=3. The largest among them is 4.

Sample Input 2

4 -2

Sample Output 2

6

The largest is 4 - (-2) = 6.

Sample Input 3

0 0

Sample Output 3

0

Solution in C# (Mono 4.6.2.0) (judge verdict: Runtime Error)

using System;
using System.Linq;

namespace Cs_Tutorial
{
    class Program
    {
        public static void B_Cut_And_Count()
        {
            // 長さ N の入力
            int N = int.Parse(Console.ReadLine());

            // 文字列 S の入力
            string S = Console.ReadLine();

            // ループ
            int max = 0;
            int tmp = 0;

            for (int i = 1; i < N; i++)
            {
                // 文字列の分断
                string X = S.Remove(i);
                string Y = S.Substring(i);

                // Xの分断
                char C = X[0];
                string D = X.Substring(1);

                for (int j = 0; j < X.Length; j++)
                {
                    // CがDに含まれずYに含まれていたら加算
                    if (!(D.Contains(C)) && Y.Contains(C))
                    {
                        tmp += 1;
                    }

                    // C、Dを更新
                    if (D.Length != 0)
                    {
                        C = D[0];
                        D = D.Substring(1);
                    }
                }

                // maxの更新、tmpリセット
                if (max <= tmp)
                {
                    max = tmp;
                }

                tmp = 0;

            }

            // 出力
            Console.WriteLine(max);


        }

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