#include using namespace std; typedef long long ll; #define rep(i,l,r) for(int i=(l);i<(r);++i) int main(){ int n; cin>>n; int r=n%3; if(r==0) cout<<0<