def get_network_bits(mask_binary):
    """
    Returns number of network bits of given mask
    :param mask_binary: Subnet Mask in binary
    :return: Number of network bits
    """
    count = 0
    for i in mask_binary:
        if int(i) == 1:
            count += 1
    return count