[백준: 1436] 영화감독 숌
"""
시작시간: 02:56
종료시간: 03:05
"""
n = int(input())
num, cnt = 0, 0
while cnt < n:
num += 1
if "666" in str(num):
cnt += 1
print(num)
[백준: 1874] 스택 수열
"""
시작시간: 03:07
종료시간: 03:25
"""
n = int(input())
check_arr = [int(input()) for _ in range(n)]
stack_arr = [0]
answer = list()
idx, st_num = 0, 1
while idx < n and st_num <= n + 1:
if stack_arr[-1] != check_arr[idx]:
stack_arr.append(st_num)
st_num += 1
answer.append("+")
else:
stack_arr.pop()
idx += 1
answer.append("-")
if stack_arr != [0]:
print("NO")
else:
for i in answer:
print(*i)