import std.stdio;
import std.string;
import std.conv;
import std.array;

void main()
{
    ulong N = readln.split[0].to!ulong;
    char[] S = readln.chomp.to!(char[]);

    int cnt = 0;
    foreach (c; S) if (c == '.') cnt++;

    ulong ans0 = cnt;
    if (S[0] == '.') ans0--;

    ulong ans1 = N - cnt;

    writeln(ans0 < ans1 ? ans0 : ans1);
}

