#include<bits/stdc++.h>

using namespace std;

int main()
{
    string input, input1;
    unsigned int inst;
    cin >>input1;
    cin >>input;
    inst = count(input1.begin(), input1.end(), 'a');
    replace(input1.begin(), input1.end(), 'a', '*');
    cout << inst << endl;
    cout << input1 << endl;

    return 0;
}