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