def get_heading_level(heading):
    """Returns the level of a given Markdown heading
    
    Arguments:
    heading -- Markdown title    
    """
    i = 0
    while( i < len(heading) and heading[i] == '#' ):
        i += 1

    return i