#include <bits/stdc++.h>
using namespace std;

int main(){
    string s;
    cin >> s;

    if(s.length() == 3) reverse(s.begin(),s.end());
    cout << s << endl;
    return 0;
}
#include<bits/stdc++.h>
#define forr(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i,n) for(int i = 0; i < (n); i++)
#define rrep(i,n) for(int i = 1; i <= (n); i++)
#define ALL(a) (a.begin()),(a.end())
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll, ll> LP;
const ll LINF = 1LL<<60;
const int INF = 1001001001;
const int MOD = 1000000007;

/* --------------------------------------------------- */

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