#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int black = 0, ans = 0;
  int i = 0;
  while (S[i] != '\0') {
    if (black == 1 && S[i] == '.') {
      S[i] = '#';
      ans++;
    }
    if (S[i] == '#') black = 1;
    i++;
  }
  cout << ans << endl;
}
