#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long MAX_LL = 1e18 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  string s;
  cin >> s;
  int a = 0, b = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'a')
      a++;
    else if (s[i] == 'b')
      b++;
    if (abs(a - b) > 1) {
      if (s[i] == 'a') {
        a--;
        b++;
        s[i] = 'b';
      } else {
        a++;
        b--;
        s[i] = 'a';
      }
      ans++;
    }
  }
  cout << ans << "\n" << s << "\n";
  return 0;
}
