#include int main(void){ int N; int a[11]={4,7,8,9,1,5,6,0,2,3,1}; scanf("%d",&N); printf("%d",a[N]); return 0; }