15 lines
318 B
Python
15 lines
318 B
Python
problems = input()
|
|
problems = problems.split(';')
|
|
|
|
all_prob = []
|
|
for problem in problems:
|
|
if '-' in problem:
|
|
start, stop = problem.split('-')
|
|
for i in range(int(start), int(stop)+1):
|
|
all_prob.append(i)
|
|
else:
|
|
all_prob.append(int(problem))
|
|
|
|
|
|
print(len(set(all_prob)))
|