#include #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ int n; scanf("%d",&n); int a[]={-1,7,8,9,4,5,6,1,2,3,0}; printf("%d\n",a[n]); return 0; }