#include using namespace std; typedef unsigned long long LL; int main(int argc, char* argv[]) { int M; cin>>M; if (M==0 || M%2017==0){ cout<<0<