#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>

int
main(void)
{
        int N;
        char *stone;
        int result = INT_MAX;
        int black = 0;
        int white = 0;

        scanf("%d\n", &N);
        stone = malloc(N);
        memset(stone, 0, sizeof(char) * N);

        for (int i = 0; i < N; i++) {
                char c;
                scanf("%c", &c);

                if (c == '.')
                        white++;
                else
                        stone[i] = 1;
        }

        for (int i = 0; i < N; i++) {
                if(white + black < result)
                        result = white + black;
                printf("%d:%d\n", i, white + black);

                if (stone[i] == 1)
                        black++;
                else
                        white--;
        }

        printf("%d", result);

        return 0;
}
