# coding:utf-8

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

    print(count1)


if __name__ == "__main__":
    main()