v,t,p = map(int,input().split()) s,w,snr = 0,0,0 while w < v: w += 1; s += 1 snr = snr-1 if snr>0 else snr if w==v and p>0: p -= 1 w = 0 elif snr==0: snr = t w -= 1 else: t = 10**8 if v-w > t and snr > t: for thr in [10**x for x in range(8,2,-1)]: if v-w > thr and snr > thr: w += thr; s+= thr; snr -= thr print(s)