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 (i; 1..N) if (S[i] == '#') cnt++;

    if (cnt > 0) writeln((N - 1) - cnt);
    else writeln(0);
}

