#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string a;
  int ans = 0, ans2 = 1, flag = 0, temp = 0;
  cin >> n;
  cin >> a;
  for (int i = 0; i < n; i++) {
    if (flag) {
      if (a[i] == '.') {
        ans++;
        ans2 += temp;
        temp = 0;
      }
      if (a[i] == '#') temp++;
    }
    if (a[i] == '#') flag = 1;
  }
  cout << min(ans, ans2);
  return 0;
}
