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