#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    int a,b,azb,abb,amb;
    cin>>a>>b;
    azb=a*b;
    abb=a+b;
    amb=a-b;
    cout << fmax(fmax(azb,abb),amb);
}

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> p_ll;

template<class T>
void debug(T itr1, T itr2) { auto now = itr1; while(now<itr2) { cout << *now << " "; now++; } cout << endl; }
#define repr(i,from,to) for (int i=(int)from; i<(int)to; i++)
#define rep(i,N) repr(i,0,N)
#define per(i,N) for (int i=(int)N-1; i>=0; i--)

const ll MOD = pow(10,9)+7;
const ll LLINF = pow(2,61)-1;
const int INF = pow(2,30)-1;


int main() {
  int N; cin >> N;
  int result = 180 * (N-2);
  cout << result << endl;
  return 0;
}