def header_level(s):
    """count the number of equal signs at beginning of a string"""

    result = 0
    for letter in s:
        if letter == "=":
            result += 1
        else:
            break
    return result