import sys
n = int(sys.stdin.readline())
bag = 0
while n >= 0:
if n % 5 == 0:
bag += (n // 5)
print(bag)
break
n -= 3
bag += 1
else:
print(-1)
import sys
n = int(sys.stdin.readline())
end3 = n // 3
end5 = n // 5
for i in range(end3+1):
for j in range(end5+1):
if (i * 3) + (j * 5) == n:
print(i+j)
exit()
print(-1)