N,K = (int(x) for x in input().split())
Conv = []
while N!=0:
    Conv.append(N%K)
    N = N//K
    
Disp = ''.join([str(x) for x in Conv[::-1]])
print(len(Disp)) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N,K = (int(x) for x in input().split()) N (int(x) for x in input().split()) K Conv = [] Conv [] while N!=0:
    Conv.append(N%K)
    N = N//K
     N!=0 N 0 Conv.append(N%K) Conv.append Conv append N%K N K N = N//K N N//K N K str(x) for x in Conv[::-1] for x in Conv[::-1] x Conv[::-1] Conv ::-1 -1 for x in Conv[::-1] str(x) str x Disp = ''.join([str(x) for x in Conv[::-1]]) Disp ''.join([str(x) for x in Conv[::-1]]) ''.join '' join [str(x) for x in Conv[::-1]] print(len(Disp)) print len(Disp) len Disp Conv = [] [] Conv N = N//K N//K N K = (int(x) for x in input().split()) (int(x) for x in input().split()) K N,K = (int(x) for x in input().split()) (int(x) for x in input().split()) N Disp = ''.join([str(x) for x in Conv[::-1]]) ''.join([str(x) for x in Conv[::-1]]) Disp
N,K = (int(x) for x in input().split())
Conv = []
while N!=0:
    Conv.append(N%K)
    N = N//K
    
Disp = ''.join([str(x) for x in Conv[::-1]])
print(len(Disp))