import java.util.*; class y395 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a=sc.nextInt(); System.out.println(a<15?-1:(a-7)); sc.close(); } }