#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int now = 0;
  int count = 0;
  for (int i = 0; i < S.size(); i++) {
    char stone_now = S[i];
    if (stone_now == '.' and now == 1) {
      count++;
    } else if (stone_now == '#' and now == 0) {
      now = 1;
    }
  }
  cout << count << endl;
}
