using System;

namespace vezba
{
    class Program
    {
        static void Main(string[] args)
        {
            string source = Console.ReadLine();
            int br = 0;
            foreach (char c in source) if (c == 'a') br++; 
            var replacement = source.Replace('a', '*');
            Console.WriteLine(br);
            Console.WriteLine(replacement);
        }
    }
}