using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; using System.Threading; using System.Runtime.CompilerServices; using System.Diagnostics; //using nint=System.Int32; static class Program{ const int mod=998244353; static void Main(){ Sc sc=new Sc(); //var (n,m)=sc.Tp2(); var n=sc.I; var osak=new Osak(n); int m=n>>1; var h=new int[n+1]; for(int i = 1;i<=m;i++) { var hs=new Dictionary(); osak.Pf(i,(g)=>{ if(hs.ContainsKey(g)){hs[g]++;} else{hs.Add(g,1);} }); osak.Pf(n-i,(g)=>{ if(hs.ContainsKey(g)){hs[g]++;} else{hs.Add(g,1);} }); foreach(var e in hs){ h[e.Key]=Max(h[e.Key],e.Value); } } long ans=1; for(int i = 2;i<=n;i++) { if(h[i]!=0){ ans*=Fp(i,h[i]); ans%=mod; } } Console.WriteLine("{0}",ans); } static long Fp(long x,long e){ long r=1; while(e>0){ if((e&1)>0){r*=x;r%=mod;} x=x*x%mod; e>>=1; } return r; } } public class Osak{ public int[] b; public Osak(int n){ b=new int[n+1]; int m=(int)Sqrt(n); for(int i=2;i<=m;i++){ if(b[i]==0){ for(int j=i*i;j<=n;j+=i){ if(b[j]==0){b[j]=i;} } } } } public bool this[int i]{get{return b[i]==0;}} public void Pf(int n,Action f){ if(n==1){return;} while(b[n]!=0){ f(b[n]); n=n/b[n]; } f(n); } } public class Sc{ public int I{get{return int.Parse(Console.ReadLine());}} public long L{get{return long.Parse(Console.ReadLine());}} public double D{get{return double.Parse(Console.ReadLine());}} public string S{get{return Console.ReadLine();}} public int[] Ia{get{return Array.ConvertAll(Console.ReadLine().Split(),int.Parse);}} public long[] La{get{return Array.ConvertAll(Console.ReadLine().Split(),long.Parse);}} public double[] Da{get{return Array.ConvertAll(Console.ReadLine().Split(),double.Parse);}} public string[] Sa{get{return Console.ReadLine().Split();}} public object[] Oa{get{return Console.ReadLine().Split();}} public int[] Ia2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),int.Parse);}} public int[] Ia3(string a,string b){return Array.ConvertAll((a+Console.ReadLine()+b).Split(),int.Parse);} public int[] Ia3(int a){return Array.ConvertAll((Console.ReadLine()+" "+a.ToString()).Split(),int.Parse);} public long[] La2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),long.Parse);}} public long[] La3(string a,string b){return Array.ConvertAll((a+Console.ReadLine()+b).Split(),long.Parse);} public long[] La3(int a){return Array.ConvertAll((Console.ReadLine()+" "+a.ToString()).Split(),long.Parse);} public double[] Da2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),double.Parse);}} public double[] Da3(string a,string b){return Array.ConvertAll((a+Console.ReadLine()+b).Split(),double.Parse);} public T[] Arr(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]));} public (T1,T2) Tp2(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]));} public (T,T,T) Tp3(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]),Ct(s[2]));} public (T1,T1,T2) Tp3(){var s=Console.ReadLine().Split();return (Ct(s[0]),Ct(s[1]),Ct(s[2]));} private T Ct(string s){return (T)Convert.ChangeType(s,typeof(T));} }