def neutral_head_length(ref, alt):
    """
    returns index of first non-N(eutral) nucleotide
    :param ref: e.g NNNNA
    :param alt: e.g NNNNG
    :return:
    """
    i = 0
    while i < len(ref) and ref[i] == 'N' and i < len(alt) and alt[i] == 'N':
        i += 1
    return i
