main(n){n=atoi(gets(&n));puts(n>2?n%2?"3":"2":"1");}