import java.util.Scanner; public class Yukicoder395 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int res = -1; if (A >= 8) { res = A - 7; } System.out.println(res); } }