using System;
					
public class Program
{
	public static void Main()
	{
		//°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸Kobato Love°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸
		int a;
		string b;
		a = int.Parse(Console.ReadLine()); 
		b = Console.ReadLine(); 
		int count = 0;
		
		for(int i = 0; i < a-1; i++)
		{
			if(b[i] == '#' && b[i+1] == '.')
			{
				i++;
				count++;	
			}
			else if(b[i] == '#' && b[i+1] == '#')
			{
				count += (a - i -2);
				break;
			}
		}
		Console.WriteLine(count);
		
		
	}
}
