#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int first = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9';) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  for (; ch >= '0' && ch <= '9';) {
    first = first * 10 + ch - '0';
    ch = getchar();
  }
  return first * f;
}
int main() {
  long long first;
  scanf("%I64d", &first);
  printf("%I64d\n", ((first % 360 + 405) % 360 - 1) / 90);
}
