#include using namespace std; #define int long long signed main(){ int n; cin >> n; int a[10] = {7, 8, 9, 4, 5, 6, 1, 2, 3, 0}; cout << a[n - 1] << endl; }