#include<iostream> #include<cmath> using namespace std; int main(){ int y; cin>>y; cout<<4-(y-2000)%4; return 0; }