#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int i;
  if (n == 1)
    cout << "1\n";
  else if (n == 2) {
    if (s[0] == s[1])
      cout << "2\n";
    else {
      cout << "0\n" << s;
    }
  } else {
    vector<int> v1;
    int j = 0;
    int x1 = 0;
    for (i = 1; j < s.length() && i < s.length();) {
      if (s[j] == s[i]) {
        i++;
      } else {
        v1.push_back(j);
        v1.push_back(i);
        j = i + 1;
        i++;
        x1 += 2;
      }
    }
    if (x1 % 2 == 0) {
      cout << n - x1 << "\n";
      for (i = 0; i < x1; i++) {
        cout << s[v1[i]];
      }
    } else {
      cout << n - x1 - 1 << "\n";
      for (i = 0; i < x1 - 1; i++) {
        cout << s[v1[i]];
      }
    }
  }
  return 0;
}
