def convert_binary(num):
result = []
if num <= 1:
result.append(num)
else:
while True:
consult = num / 2
reminder = num % 2
result.append(reminder)
if consult == 1:
result.append(consult)
break
num = consult
return int("".join(map(str,result)))