Competitions

# 2022 Azerbaijan Round 1, 8-9-10-11 classes

# Split into composite numbers

What is the largest number of composite integers can be used to represent the number **n** as a sum of composite numbers?

**Note:** A positive integer that has a divisor other than itself and **1** is called a composite.

#### Input data

One integer **n** (**1** ≤ **n** ≤ `10`

).^{18}

#### Output

Print the largest number of composite integers that can be used so that their sum equals **n**. If **n** cannot be represented as a sum of composite numbers, print **-1**.

Input example #1

8

Output example #1

2

Input example #2

6

Output example #2

1

Input example #3

15

Output example #3

2

Input example #4

7

Output example #4

-1