#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e17 + 99999999;
const long long Mod = (long long)1e9 + 7;
const long long MaXN = (long long)1e18;
const int N = (int)1e6 + 7;
const int MaXI = (int)1e9;
const int Mass = (int)2e5;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long angle;
  cin >> angle;
  angle = (angle % 360 + 360) % 360;
  angle = (angle + 44) % 360;
  cout << (angle % 359) / 90;
  return 0;
}
