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

int main()
{
    char str[200000];
    char ovojea;
    scanf("%s %c", &str, &ovojea);
    int i = 0, n = 0;
    char c = str[i];
    while (c != '\0') {
        if (c == 'a') {
            n++;
        }
        c = str[++i];
    }

    printf("%i\n", n);
    c = str[i = 0];
    while (c != '\0') {
        if (c != 'a') {
            printf("%c", c);
        } else {
            printf("%c", '*');
        }
        c = str[++i];
    }
    return 0;
}