#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count1 = 1, count2 = 0;
  string a, b;
  cin >> n >> a;
  b = a;
  for (int i = 0; i < a.size() - 1; i++) {
    if (a[i] == '#' && a[i + 1] == '.') {
      a[i + 1] = '#';
      count1++;
    }
  }
  for (int i = 0; i < b.size() - 1; i++) {
    if (b[i] == '#' && b[i + 1] == '.') {
      b[i] = '.';
      count2++;
    }
  }
  if (count1 > count2) {
    cout << count2;
  } else
    cout << count1;
  return 0;
}
