main = getLine >>= print . (\a -> if 14 < a then a - 7 else -1 ) . read