#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  unsigned int n = 0, i = 0, j = 0, cnt1 = 0, cnt2 = 0;
  scanf("%u", &n);
  char s[2 * 100000];
  scanf("%s", s);
  while (s[j] == '.') {
    j++;
  }
  while (s[n - 1] == '#') {
    n = n - 1;
  }
  cnt2++;
  if (n == 0) {
    printf("%d", j);
  } else {
    for (i = j + 1; i < n; i++) {
      if (s[i] == '#') {
        cnt2++;
      } else {
        cnt1++;
      }
    }
    printf("%c", s[0]);
  }
  return 0;
}
