#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  cin >> x;
  x %= 360;
  if (x < 0) x += 360;
  if (x <= 45 || x >= 315)
    cout << 0;
  else if (x <= 135)
    cout << 1;
  else if (x <= 225)
    cout << 2;
  else
    cout << 3;
  return 0;
}
