#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
char str[N];
vector<char> ve;
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", str + 1);
  for (int i = 1; i <= n; i++) {
    if (ve.size()) {
      if (str[i] == ve[ve.size() - 1] && ((ve.size() + 1) % 2 == 0))
        continue;
      else
        ve.push_back(str[i]);
    } else
      ve.push_back(str[i]);
  }
  int m = ve.size();
  if (m & 1) m--;
  if (m == n && m & 1) m = n - 1;
  printf("%d\n", n - m);
  for (int i = 0; i < m; i++) printf("%c", ve[i]);
  return 0;
}
