# -*- coding: utf-8 -*-

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    n = int(lines[0])
    s = lines[1]

    return (n, s)


def solve(n, s):
    
    ss = []
    for c in s:
        if c == ".":
            ss.append(True)
        else:
            ss.append(False)

    len_ss = len(ss)
    result = 0
    if len_ss == 1:
        result = 0
    else:
        for i, d in enumerate(ss):
            if ss[i] is False and ss[i+1] is True:
                ss[i+1] = False
                result = result + 1




    return result


def main():
    # 出力

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()
