2839 | 설탕배달
https://www.acmicpc.net/problem/2839
N = int(input())
ex = False
for i in range (N//3 + 1):
for j in range (N//5 + 1):
if N == 3*i + 5*j:
ex = True
print(i+j)
break
if ex:
break
if not ex:
print(-1)
N = int(input())
bag = 0
while N >= 0:
# If dived into 5, div and print bag
if N % 5 == 0:
bag += N // 5
print(bag)
break
# If not dived into 5, sub 3 and add 1 bag
N -= 3
bag += 1
else:
print(-1)