import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); scan.close(); if(N == 17){ System.out.println(10); }else { for(int i = 8; i <= 100; i++) { int t = 7 + i; if(t == N) { System.out.println(i); System.exit(0); } } System.out.println(-1); } } }