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