#include using namespace std; int a[] = {0,1,1,0}; int main() { ios_base::sync_with_stdio(0); long long int n; cin>>n; cout<<15+a[n%4]; return 0; }