#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>

#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
#define TBMod 1000000007

int main(int argc, char const *argv[])
{
	int n;
	int b = 0,h = 0;
	char s[200007];
	for (int i = 0; i < n; ++i)
	{
		if(s[i] == '.')	++w;
		else ++b;	
	}
	if(s[0] == '#')	printf("%d\n", (w < b ? w : b));
	else printf("%d\n", abs(w - b));
	return 0;
}
