import java.io.*; import java.util.*; class Test02{ public static void main(String args[])throws IOException{ Scanner scan = new Scanner(System.in); int num = scan.nextInt(); if(num < 17){ System.out.println("-1"); }else{ System.out.println(num - 7); } } }