#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int inf = 1e9;
const double PI = acos(-1.0);
const long long INF = 1e18;
const int N = 2e5 + 5;
int len;
string s;
int dp[N][30][5];
int solve(int idx, int prev, int cnt) {
  if (idx >= len) return cnt == 0 ? 0 : -inf;
  if (dp[idx][prev][cnt] != -1) return dp[idx][prev][cnt];
  int ret = -inf;
  ret = solve(idx + 1, prev, cnt);
  int cid = s[idx] - 'a' + 1;
  if (cnt == 0) {
    ret = max(ret, 1 + solve(idx + 1, cid, 1));
  } else {
    if (cid != prev) ret = max(ret, 1 + solve(idx + 1, 0, 0));
  }
  return dp[idx][prev][cnt] = ret;
}
void print(int idx, int prev, int cnt, int mx) {
  if (idx >= len) return;
  int mx1 = inf, mx2 = -inf;
  mx1 = solve(idx + 1, prev, cnt);
  if (mx1 == mx) {
    print(idx + 1, prev, cnt, mx);
    return;
  }
  int cid = s[idx] - 'a' + 1;
  if (cnt == 0) {
    mx2 = 1 + solve(idx + 1, cid, 1);
    if (mx2 >= mx1 && mx2 == mx) {
      cout << s[idx];
      print(idx + 1, cid, 1, mx - 1);
      return;
    }
  } else {
    mx2 = 1 + solve(idx + 1, 0, 0);
    if (mx2 >= mx1 && mx2 == mx) {
      cout << s[idx];
      print(idx + 1, 0, 0, mx - 1);
      return;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> len >> s;
  memset(dp, -1, sizeof(dp));
  int mx = solve(0, 0, 0);
  cout << len - mx << "\n";
  print(0, 0, 0, mx);
  return 0;
}
