a = gets.chomp.to_i if a < 9 puts -1 else puts a - 7 end