n = gets.to_i sleep n * 0.1 puts "2222222222"[n - 1]