#include <iostream>

using namespace std;

int main()
{
  int n, a, b;
  char inpu;
  
  a = 0; b = 0;
  
  cin >> n;
  for (int x = 0; x<n; x++)
  {
    cin <<inpu;
    if (inpu = '#') a++;
    else b++;
  }
  
  if (a>b) cout << b;
  else cout << a;
}
