#include <bits/stdc++.h>
using namespace std;
int GCD(const int& a, const int& b) {
  const int& _a = max(a, b);
  const int& _b = min(a, b);
  if (_a % _b == 0) {
    return _b;
  } else {
    return GCD(_b, _a % _b);
  }
}
int LCM(const int& a, const int& b) {
  const int& _a = max(a, b);
  const int& _b = min(a, b);
  return (_a * _b) / (GCD(_a, _b));
}
int main() {
  int n;
  string s;
  cin >> n >> s;
  int ans = 0;
  if (s[0] == '#') {
    for (int i = 1; i < n; i++) {
      if (s[i] == '.') {
        ans++;
      }
    }
  } else {
    for (int i = 1; i < n; i++) {
      if (s[i] == '#') {
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
