#include int main() { int N, i, n; scanf("%d", &N); n = N % 3; switch(n){ case 0: printf("0"); break; case 1: printf("2"); break; case 2: printf("1"); } }