N = gets.to_i case N when 2 puts 'INF' when 2..4 puts 6 when 5..6 puts 4 else puts 2 end