#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np
import scipy as sp

def main():
    while True:
        try:
            il = [input() for i in range(2)]
            N = int(il[0])
            S = il[1]
            print(S.count('#.'))
        except:
            break

if __name__ == '__main__':
    main()
