using System;

class Program{
    public static void Main(){
        string t = Console.ReadLine();
        string s = Console.ReadLine();
        int brojac = 0;
        for(int i = 0; i<t.Length; i++){
            if(t[i] == 'a') brojac++;
        }
        Console.WriteLine(brojac);
        for(int i = 0; i<t.Length; i++){
            if(t[i] == 'a') Console.Write("*");
            else Console.Write(t[i]);
        }
        Console.WriteLine();
    }
}