# coding:utf-8

def main():
    N = int(input())
    s = input()
    count1 = 0
    count2 = 0
    for i in s:
        if i != ".":
            count1 += 1
        if i != "#":
            count2 += 1

    print(min(count1,count2))


if __name__ == "__main__":
    main()