#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int flag = 0;
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (flag == 0) {
      if (s[n - 1 - i] == '.') {
        count++;
      }
    } else if (flag == 1) {
      if (s[n - 1 - i] == '#') {
        count++;
      }
    }
    if (s[n - 1 - i] == '#' && s[n - 1 - i - 1] == '.') {
      flag = 1;
    }
  }
  string ss;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      ss.push_back('#');
    } else {
      ss.push_back('.');
    }
  }
  if (count == n) {
    count = 0;
  }
  if (s == ss) {
    count = 1;
  }
  cout << count << endl;
  return 0;
}
