import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.close(); Eratosthenes era = new Eratosthenes(n); Map map = new HashMap<>(); for (int i = 1; i < n; i++) { Map map1 = era.bunkai(i); Map map2 = era.bunkai(n - i); for (Integer key : map2.keySet()) { map1.put(key, map1.getOrDefault(key, 0) + map2.get(key)); } for (Integer key : map1.keySet()) { map.put(key, Math.max(map.getOrDefault(key, 0), map1.get(key))); } } int mod = 998244353; long ans = 1; for (Integer key : map.keySet()) { ans *= power(key, map.get(key), mod); ans %= mod; } System.out.println(ans); } static long power(long x, long n, int m) { if (n == 0) { return 1; } long val = power(x, n / 2, m); val = val * val % m; if (n % 2 == 1) { val = val * x % m; } return val; } static class Eratosthenes { int[] div; public Eratosthenes(int n) { if (n < 2) return; div = new int[n + 1]; div[0] = -1; div[1] = -1; int end = (int) Math.sqrt(n) + 1; for (int i = 2; i <= end; i++) { if (div[i] == 0) { div[i] = i; for (int j = i * i; j <= n; j+=i) { if (div[j] == 0) div[j] = i; } } } for (int i = end + 1; i <= n; i++) { if (div[i] == 0) div[i] = i; } } public Map bunkai(int x) { Map soinsu = new HashMap<>(); while (x > 1) { Integer d = div[x]; soinsu.put(d, soinsu.getOrDefault(d, 0) + 1); x /= d; } return soinsu; } public boolean isSosuu(int x) { return div[x] == x; } } }