a = gets.to_i if (a > 7) && (a-7 > 7) then ans = a-7 else ans = -1 end puts ans