def count_char_position(str1):
    count = 0
    for i, ch in enumerate(str1, 1):
        if ('a' <= ch <= 'z' and ord(ch) - ord('a') + 1 == i) or ('A' <= ch <= 'Z' and ord(ch) - ord('A') + 1 == i):
            count += 1
    return count