# -*- coding: utf-8 -*- """ No.395 永遠の17歳 https://yukicoder.me/problems/no/395 """ import sys from sys import stdin input = stdin.readline def main(args): A = int(input()) ans = A - 7 if ans <= 0: print(-1) else: print(ans) if __name__ == '__main__': main(sys.argv[1:])