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