


# 백준 #23235 (The Fastest Sorting Algorithm In The World)
# 0이 들어올때까지 무한 반복
condition = True
count = 0
while condition :
Numbers_List = list(map(int,input().split()))
if Numbers_List[0] == 0 :
condition = False
else :
count += 1
print("Case %d: Sorting... done!"% count)