using System;
using System.Collections.Generic;
using System.Linq;

public class Program
{

	static void Main(string[] args)
	{
		var N = int.Parse(Console.ReadLine());
		var S = Console.ReadLine();

		var white = S.Count(x => x == '.');
		var black = S.Count(x => x == '#');

		if (black > white)
		{
			Console.Write(white);
		}
		else
			Console.Write(black);
	}
}
