def get_network_size(netmask):
    """Get cidr size of network from netmask"""
    b = ''
    for octet in netmask.split('.'):
        b += bin(int(octet))[2:].zfill(8)
    return str(len(b.rstrip('0')))