#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int N = 2e5 + 1;
const int MOD = 1e9 + 7;
long long int f[N], l[N];
long long int swap(long long int *p, long long int *q) {
  long long int temp = *p;
  *p = *q;
  *q = temp;
  return temp;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long int t;
  t = 1;
  while (t--) {
    long long int n, x, y;
    long long int i, j, h = 1;
    cin >> n;
    long long int Mx = 0, Mn = N;
    vector<long long int> cnt(N, 0);
    multiset<long long int> s;
    long long int c = 0;
    char a[n], b[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    i = 0;
    h = 0;
    while (i < n) {
      if (a[i] == a[i + 1]) {
        i = i + 1;
        c++;
      } else {
        i = i + 2;
        b[h++] = a[i - 2];
        b[h++] = a[i - 1];
      }
    }
    if ((n - c) % 2 != 0) c++;
    cout << c << endl;
    for (i = 0; i < n - c; i++) {
      cout << b[i];
    }
  }
}
