require 'prime' M = 998244353 n = gets.to_i exclude = (1..n).to_a.reverse.find {|a| a.prime? } ppp = {} (1..n).each do |a| next if a == exclude ps = a.prime_division ps.each do |p, cnt| ppp[p] ||= 0 ppp[p] = cnt if ppp[p] < cnt end end ans = 1 ppp.each do |p, cnt| (1..cnt).each { ans = (ans * p) % M } end puts ans