문제2745
int(string , base) print(int("111" , 2)) # 111을 2진법 인수를 10진법으로 변환
n,b = map(str,input().split()) print(int(n,int(b)))