#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b);
long long int lcm(long long int x, long long int y);
long long int bur(long long int N, long long int X);
bool IsPrime(int num);
bool dp[110][10010];
class UnionFind;
class UnionFind {
 public:
  vector<int> Parent;
  UnionFind(int N) { Parent = vector<int>(N, -1); }
  int root(int A) {
    if (Parent[A] < 0) return A;
    return Parent[A] = root(Parent[A]);
  }
  int size(int A) { return -Parent[root(A)]; }
  int connect(int A, int B) {
    A = root(A);
    B = root(B);
    if (A == B) {
      return false;
    }
    if (size(A) < size(B)) swap(A, B);
    Parent[A] += Parent[B];
    Parent[B] = A;
    return true;
  }
};
int main(void) {
  long long int N = 0;
  long long int A = 0;
  long long int B = 0;
  long long int C = 0;
  long long int D = 0;
  long long int E = 0;
  long long int M = 0;
  long long int K = 0;
  long long int b[9] = {1, 7, 4, 5, 3, 2, 9, 6, 8};
  long long int b2[9] = {2, 3, 4, 5, 5, 5, 6, 6, 7};
  long long int c2[9] = {};
  long long int d[10] = {};
  string S, T, U[52];
  char fi[50], fv[50];
  long long int count = 0;
  float count2 = 0;
  vector<int> sum2(5);
  long long int min = 1000;
  long long int max = 1;
  long long int dist1 = 0;
  long long int dist2 = 0;
  long long int dist3 = 0;
  long long int now = 0;
  int tmax = 9;
  int tmax2 = 0;
  char temp, head, state;
  bool start = false;
  float all = 0;
  long long int amr = 0;
  long long int ket = 0;
  long long int lgh = 200000;
  char col = NULL;
  cin >> N;
  cin >> S;
  col = S[K - 1];
  for (long long int i = (0); i < (N); ++i) {
    for (long long int j = (0); j < (N); ++j) {
      if (i == j) start = true;
      if (start == true) {
        if (S[j] == '.') amr++;
      } else {
        if (S[j] == '#') amr++;
      }
    }
    if (amr == N) {
      cout << 0 << endl;
      return 0;
    }
    if (lgh > amr) {
      lgh = amr;
    }
    amr = 0;
    start = false;
  }
  cout << lgh << endl;
  return 0;
}
long long int bur(long long int N, long long int X) {
  long long int pan = 1;
  long long int pat = 1;
  long long int burg = 0;
  if (X > burg) {
    if (N == 0) return pat;
    burg += pan;
    burg += bur(N - 1, X);
    burg += pat;
    burg += bur(N - 1, X);
    burg += pan;
  }
  return burg;
}
long long int gcd(long long int a, long long int b) {
  if (a < b) {
    long long int tmp = a;
    a = b;
    b = tmp;
  }
  long long int x = b;
  long long int y = a;
  long long int r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return y / b * x;
}
bool IsPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
long long int lcm(long long int x, long long int y) {
  if (x == 0 || y == 0) {
    fprintf(stderr, "引数エラーです。\n");
    return 0;
  }
  return (x * y / gcd(x, y));
}
