#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int solve(int x, int sum) {
  if (x == n) {
    return sum;
  }
  if (s[x] == '#') {
    if (s[x + 1] == '.') {
      s[x + 1] = '#';
      return solve(x, sum + 1);
    }
  }
  return solve(x + 1, sum);
}
int main(void) {
  cin >> n >> s;
  int ans = solve(0, 0);
  cout << ans << endl;
}
