#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x)  (int)x.size()
#define SP(x)  setprecision((int)x)


using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}


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


  return 0 ;
}



#include <bits/stdc++.h>
using namespace std;
#define     LL              long long int
#define     FOR(I,A,B)      for( int I = A; I < B; ++I )
#define     SFI(X)          scanf("%d",&X)
#define     SFL(X)          scanf("%lld",&X)


int main() {

//    SAT, SUN, MON, TUE, WED, THU, FRI
//    1     2    3    4    5    6    7

    string S;

    cin >> S;

    if(S == "MON") {
            printf("6\n");
    } else if(S == "TUE") {
                printf("5\n");
    } else if(S == "WED") {
                printf("4\n");
    } else if(S == "THU") {
                printf("3\n");
    } else if(S == "FRI") {
                printf("2\n");
    } else if(S == "SAT") {
        printf("1\n");
    }else {
        printf("7\n");
    }
    
    return 0;
}
