#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T& a, T b);
template <class T>
bool chmin(T& a, T b);
int* eratosthenes(int N);
bool bit_search(int pattern, int N);
template <class T>
void cumulative_sum(T array, size_t N);
const long long int INF = 1LL << 60;
const int k_mod = 1e9 + 7;
template <typename T, typename K>
struct P {
  T a;
  K b;
};
typedef struct {
  vector<int> to;
  bool is_visited = false;
} node;
typedef struct {
  int to;
  int cost;
  P<int, int> change;
} edge;
long long int modpow(long long int a, long long int n, long long int mod) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
int main(void) {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int cnt[2] = {};
  for (auto s : S) {
    cnt[0] += (s == '.');
    cnt[1] += !(s == '.');
  }
  cout << min(cnt[0], cnt[1]) << endl;
}
int* eratosthenes(int N) {
  int* prime_array = new int[N + 1];
  int lim = N;
  prime_array[0] = 0;
  prime_array[1] = 0;
  for (int i = (2); i < (N + 1); i++) {
    prime_array[i] = 1;
  }
  for (int i = (2); i < (lim); i++) {
    if (prime_array[i] == 0) continue;
    lim = N / i;
    for (int j = i * 2; j < N + 1; j += i) {
      prime_array[j] = 0;
    }
  }
  return prime_array;
}
template <class T>
void cumulative_sum(T array, size_t N) {
  for (int i = (1); i < (N + 1); i++) {
    array[i] += array[i - 1];
  }
}
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
bool bit_search(int pattern, int N) {
  int cnt = 0;
  for (int bit = (0); bit < (N); bit++) {
    if (pattern & (1 << bit)) {
      cnt++;
    }
  }
  return true;
}
