def test():
    global count, list_str
    for i, data in enumerate(list_str):
        try:
            if data == '#' and list_str[i + 1] == '.':
                list_str[i + 1] = '#'
                count += 1
                test()
        except IndexError:
            pass


N = input()
S = input()
count = 0

list_str = list(S)


test()

# print(list_str)
print(count)