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 (GCC 5.4.1) (judge verdict: Runtime Error)

#include <stdio.h>
int main(){

  int N, i, j, k, count, max;
  char S[N], X[N], Y[N];
  char alp[] = "abcdefghijklmnopqrstuvwxyz";
  int alpnum[26];

  count = 0; max = 0;

  scanf("%d", &N);
  scanf("%s", S);

  if(N < 2) return(-1);

  for(i=0; i<26; i++){
    alpnum[j] = 0;
  }

  for(i=0; i<N; i++){
    for(j=0; j<=i; j++){
      X[j] = S[j];
    }
    for(j=i; j<N; j++){
      Y[j] = S[j];
    }

    for(j=0; j<26; j++){
      for(k=0; k<26; k++){
        if(X[j] == alp[k] || alpnum[k] == 0)
          alpnum[k] = 1;
      }
    }

    for(j=0; j<26; j++){
      for(k=0; k<26; k++){
        if(Y[j] == alp[k] || alpnum[k] == 1)
          alpnum[k] = 2;
      }
    }

    for(j=0; j<26; j++){
      if(alpnum[j] == 2)
        count++;
    }

    if(max < count)
      max = count;
  }

  printf("%d", count);
}