import sys i=1 L=[] tmp=0 while i<500: i+=1 tmp=tmp+1.0/i L.append(tmp) for line in sys.stdin: n = line.split() if((float)(n[0])==0.00): break for i in range(480): if L[i]>(float)(n[0]): print i+1, break print "card(s)"