#include <iostream>
#include <string>
using namespace std;

int main()
{
    string s,x;
    int pa,pb,b2=0,b3=0,ba=0,bb=0,b=0;
    cin>>s>>x;
    int d=s.length();
    int la[d], lb[d];
    for(int i=0;i<d;i++){
        if(s[i] == 'a'){
            s[i]='*';
            b3++;
          }
      }
    cout<<b3<<endl;
    cout<<s;
    return 0;
}