#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;

int main()
{
    ll n;
    string str;
    cin >> n >> str;
    ll count = 0, count2 = 0;
    bool found = false;
    ll limit = n;
    for (ll i = n-1; (i >= 0); --i) {
        if (str[i] != '#') {
            limit = i+1;
            break;
        }
    }
    for (ll i = 0; (i < limit); ++i) {
        if (str[i] == '#') {
            count++;
            found = true;
        }
        if (found && str[i] == '.') {
            count2++;
        }
    }
    cout << result << endl;
    return 0;
}
