
def main():
    _ = int(input())
    s = input()  # '#.#' -> '###'

    count = 0
    first_hit = False
    for char in s:
        if not first_hit:
            if char == '.':
                continue
            else:
                first_hit = True
        else:
            if char == '.':
                count += 1

    print(count)


main()
