using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; class TEST{ static void Main(){ Sol mySol =new Sol(); mySol.Solve(); } } class Sol{ public void Solve(){ // magic : in 7 out 1 // in1 : in 1 out 7 // in2 : in 2 out 8 // in3 : in 3 out 9 // in4 : in 10 out 0 // in5 : in 5 out 5 // in6 : in 6 out 6 // in7 : in 4 out 4 // in8 : in 8 out 2 // in9 : in 9 out 3 int[] A = {114514,7,8,9,4,5,6,1,2,3,0}; Console.WriteLine(A[N]); } int N; public Sol(){ N = ri(); } static String rs(){return Console.ReadLine();} static int ri(){return int.Parse(Console.ReadLine());} static long rl(){return long.Parse(Console.ReadLine());} static double rd(){return double.Parse(Console.ReadLine());} static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);} static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));} static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));} static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));} }