main(n){scanf("%d",&n);n>14?printf("%d",n-7):printf("-1");}