alist = []
round = 1
while True:
	n = raw_input()
	if n == '0':
		break
	for i in n:
		if i == ' ':
			pass
		else:
			alist.append(int(i))
	alist.sort()
	length = len(alist)
	if length % 2 == 1:
		median = (length+1)/2
		print 'Case', round, ': ',float(alist[median-1])
	elif length % 2 == 0:
		n1 = length/2
		n2 = (length/2)+1
		median = float((alist[n1-1]+alist[n2])/2)
		print 'Case', round, ': ',median
	n1,n2,median,alist,length = 0,0,0,[],0
	round +=  1
