import sys


def main():
    N = long(sys.stdin.readline())
    S = sys.stdin.readline()
    numA = S.count('.')
    numB = S.count('#')
    print(min(numA, numB))

if __name__ == "__main__":
    main()
