Problem p03023 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define tr(c, i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c, x) ((c).find(x) != (c).end())
#define cpresent(c, x) (find(all(c), x) != (c).end())
#define LSOne(i) (i & (-i))
#define rep(i, a, b) for (int(i) = (a); (i) < (b); i++)
#define rrep(i, a, b) for (int(i) = (a); (i) > (b); i--)
#define BUG(x)                                                                 \
  { cout << #x << " = " << x << endl; }
#define left(x) (x << 1)
#define right(x) ((x << 1) + 1)
#define middle(s, e) (s + (e - s) / 2)
#define size_tree(n) 2 * (int)pow(2, ceil(log2(n)))
#define CL(A, I) (memset(A, I, sizeof(A)))
#define endl '\n'
#define PHAS(_n) (pbits[(_n) >> 5] & (1u << ((_n)&0x1f)))
#define PSET(_n) (pbits[(_n) >> 5] |= (1u << ((_n)&0x1f)))
// unsigned int pbits[200000000/32+1];

static const int INF = 0x3f3f3f3f;
static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
static const long double epsilon = 1e-15;
static const long double pi = acos((long double)-1);
using namespace std;
inline void init_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef long long ll;
const int MAX_N = 100001;

/*
struct data{
  string s;
  int p,i;
  data():s(""), p(0), i(0){};
  data(string s_, int p_, int i_) : s(s_),p(p_), i(i_){};
  bool operator < (data other) const {
        if(s==other.s)
                return p>other.p;
    return s < other.s;
  }
};
*/

int st[MAX_N];
int arr[10 * MAX_N];
int L[10 * MAX_N], R[10 * MAX_N];

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  // freopen("output.txt", "w", stdout);
#endif
  init_io();
  ll n;
  cin >> n;
  cout << ((n - 2) * 180) << endl;
  return 0;
}

Fixed submission:
#include <bits/stdc++.h>
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define tr(c, i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c, x) ((c).find(x) != (c).end())
#define cpresent(c, x) (find(all(c), x) != (c).end())
#define LSOne(i) (i & (-i))
#define rep(i, a, b) for (int(i) = (a); (i) < (b); i++)
#define rrep(i, a, b) for (int(i) = (a); (i) > (b); i--)
#define BUG(x)                                                                 \
  { cout << #x << " = " << x << endl; }
#define left(x) (x << 1)
#define right(x) ((x << 1) + 1)
#define middle(s, e) (s + (e - s) / 2)
#define size_tree(n) 2 * (int)pow(2, ceil(log2(n)))
#define CL(A, I) (memset(A, I, sizeof(A)))
#define endl '\n'
#define PHAS(_n) (pbits[(_n) >> 5] & (1u << ((_n)&0x1f)))
#define PSET(_n) (pbits[(_n) >> 5] |= (1u << ((_n)&0x1f)))
// unsigned int pbits[200000000/32+1];

static const int INF = 0x3f3f3f3f;
static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
static const long double epsilon = 1e-15;
static const long double pi = acos((long double)-1);
using namespace std;
inline void init_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef long long ll;
const int MAX_N = 100001;

/*
struct data{
  string s;
  int p,i;
  data():s(""), p(0), i(0){};
  data(string s_, int p_, int i_) : s(s_),p(p_), i(i_){};
  bool operator < (data other) const {
        if(s==other.s)
                return p>other.p;
    return s < other.s;
  }
};
*/

int st[MAX_N];
int arr[10 * MAX_N];
int L[10 * MAX_N], R[10 * MAX_N];

int main() {

  init_io();
  ll n;
  cin >> n;
  cout << ((n - 2) * 180) << endl;
  return 0;
}