#include <bits/stdc++.h>
using namespace std;
int main() {
  long N;
  string str;
  cin >> N;
  cin >> str;
  long bn, wn;
  long i = 0;
  while (i < N) {
    if (str[i] == '#') {
      bn++;
      break;
    } else {
      wn++;
    }
    i++;
  }
  i++;
  while (i < N) {
    if (str[i] == '#') {
      bn++;
    } else {
      wn++;
    }
    i++;
  }
  if (bn < wn) {
    cout << bn << "\n";
  } else {
    cout << wn << "\n";
  }
}
