import re

n = int(input("Enter a number : "))

def count1(n):
    num = bin(n).replace("0b","")
    print(num)
    s = str(num)
    r = re.sub('[0-]',"",s)
    c = len(r)
    print(c)
    return

count1(n)
dfb270a18d4d607c186bb6db3cbcb4fbab7f8019
<mask token>

<mask token>


def count1(n):
    num = bin(n).replace('0b', '')
    print(num)
    s = str(num)
    r = re.sub('[0-]', '', s)
    c = len(r)
    print(c)
    return


count1(n)

<mask token>
n = int(input('Enter a number : '))


def count1(n):
    num = bin(n).replace('0b', '')
    print(num)
    s = str(num)
    r = re.sub('[0-]', '', s)
    c = len(r)
    print(c)
    return


count1(n)

import re
n = int(input('Enter a number : '))


def count1(n):
    num = bin(n).replace('0b', '')
    print(num)
    s = str(num)
    r = re.sub('[0-]', '', s)
    c = len(r)
    print(c)
    return


count1(n)

import re

n = int(input("Enter a number : "))

def count1(n):
    num = bin(n).replace("0b","")
    print(num)
    s = str(num)
    r = re.sub('[0-]',"",s)
    c = len(r)
    print(c)
    return

count1(n)