Problem: There are N stones arranged in a row. Every stone is painted white or black. A string S represents the color of the stones. The i-th stone from the left is white if the i-th character of S is `.`, and the stone is black if the character is `#`.

Takahashi wants to change the colors of some stones to black or white so that there will be no white stone immediately to the right of a black stone. Find the minimum number of stones that needs to be recolored.

Constraints

* 1 \leq N \leq 2\times 10^5
* S is a string of length N consisting of `.` and `#`.

Input

Input is given from Standard Input in the following format:


N
S


Output

Print the minimum number of stones that needs to be recolored.

Examples

Input

3
#.#


Output

1


Input

3
.#


Output

1


Input

5
.##.


Output

2


Input

9
.........


Output

0

Solution (in PYTHON):

Solution:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    input_raw = read_func().strip().split()
    S = input_raw[0]

    new_S = ""
    count = 0
    for i in range(N):
        if S[i] != "#":
            count += 1
    min_count = count
    for i in range(N):
        if S[i] == ".":
            count -= 1
        else:
            count += 1
        min_count = min(min_count, count)
    print min_count


##    new_S1 = ""
##    new_S2 = ""
##    flag = False
##    for i in range(N):
##        if S[i] == "." and flag == False:
##            new_S1 += "."
##        else:
##            new_S1 += "#"
##            flag = True
##
##    flag = False
##    for i in range(N):
##        if S[N - i - 1] == "#" and flag == False:
##            new_S2 += "#"
##        else:
##            new_S2 += "."
##            flag = True
##    count1 = 0
##    count2 = 0
##    new_S2 = new_S2[::-1]
##    for i in range(N):
##        if S[i] != new_S1[i]:
##            count1 += 1
##        if S[i] != new_S2[i]:
##            count2 += 1
##    print min(count1, count2)


if __name__ == '__main__':
    main()