#include #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ int n; scanf("%d",&n); int ans; switch(n){ case 1: ans=7; break; case 4: ans=4; break; case 5: ans=5; break; case 7: ans=1; break; case 8: ans=2; break; case 10: ans=0; break; default: ans=1; break; } printf("%d\n",ans); return 0; }