require "prime" puts Prime.prime_division(gets.to_i).select{|x| x[1]%2==1}.map{|x| x[0]}.reduce(1, :*)