#include <bits/stdc++.h>
using namespace std;
const long long fix = (long long)1e9 + 7;
long long po2(long long a) {
  long double temp = a;
  if (log2(temp) == (long long)log2(temp)) return log2(temp);
  return -1;
}
void tc(long long i) { cout << "Case #" << i + 1 << ": "; }
void yes() { cout << "YES" << '\n'; }
void no() { cout << "NO" << '\n'; }
void impb() { cout << "IMPOSSIBLE" << '\n'; }
long long ct() {
  long long t;
  scanf("%lld", &t);
  return t;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long pwr(long long a, long long b) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2) x = (x * y) % fix;
    y = (y * y) % fix;
    b /= 2;
  }
  return x;
}
long long power(long long a, long long b) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2) x = (x * y);
    y = (y * y);
    b /= 2;
  }
  return x;
}
long long pmodinv(long long a) { return pwr(a, fix - 2); }
void error() { cerr << "Here!" << '\n'; }
vector<vector<long long> > adj;
void ginit(long long n, long long m) {
  adj.resize(n + 5);
  for (long long j = (0); j < (m); ++j) {
    long long x = ct(), y = ct();
    adj[x].push_back(y), adj[y].push_back(x);
  }
}
const long long N = 1e3 + 5;
bool visited[N] = {};
long long comanc(long long u, long long v, long long parent[]) {
  while (u ^ v) {
    if (u == 1 || v == 1) return 1;
    u = parent[u];
    v = parent[v];
  }
  return u;
}
long long _min(long long a, long long b) {
  if (a < b) return a;
  return b;
}
long long _max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
vector<long long> factorial(N);
long long nCr(long long n, long long k) {
  if (n < k) return 0;
  return (factorial[n] *
          ((pmodinv(factorial[k]) * pmodinv(factorial[n - k])) % fix)) %
         fix;
}
vector<long long> dsu_par(N);
vector<long long> sze(N);
void make_set(long long n) {
  for (long long j = (1); j < (n + 5); ++j) {
    dsu_par[j] = j;
    sze[j] = 1;
  }
}
long long find_set(long long a) {
  if (dsu_par[a] == a) return a;
  return dsu_par[a] = find_set(dsu_par[a]);
}
void union_set(long long a, long long b) {
  a = find_set(a);
  b = find_set(b);
  if (a ^ b) {
    if (sze[a] < sze[b]) swap(a, b);
    dsu_par[b] = a;
    sze[a] += sze[b];
  }
}
map<pair<long long, long long>, long long> mp;
vector<vector<long long> > up;
vector<long long> tin, tout;
long long dfs_timer = 0;
long long lim;
long long dist[N] = {};
void _dfs(long long v, long long par) {
  tin[v] = ++dfs_timer;
  up[v][0] = par;
  for (long long j = (1); j < (lim + 1); ++j)
    up[v][j] = up[up[v][j - 1]][j - 1];
  for (long long u : adj[v]) {
    if (u ^ par) {
      dist[u] = dist[v] + mp.find(pair<long long, long long>(u, v))->second;
      _dfs(u, v);
    }
  }
  tout[v] = ++dfs_timer;
}
bool is_anc(long long u, long long v) {
  return tin[u] <= tin[v] && tout[u] >= tout[v];
}
long long lca(long long u, long long v) {
  if (is_anc(u, v)) return u;
  if (is_anc(v, u)) return v;
  for (long long i = lim; i >= 0; i--)
    if (is_anc(up[u][i], v) ^ 1) u = up[u][i];
  return up[u][0];
}
bool func(long long para, vector<long long>& arr, long long tar) {
  if (arr[para] > tar) return true;
  return false;
}
long long f_binsearch(long long lo, long long hi, vector<long long>& arr,
                      long long tar) {
  while (lo < hi) {
    long long mid = lo + (hi - lo + 1) / 2;
    if (func(mid, arr, tar)) {
      hi = mid - 1;
    } else {
      lo = mid;
    }
  }
  return lo;
}
long long t_binsearch(long long lo, long long hi, vector<long long>& arr,
                      long long tar) {
  while (lo < hi) {
    long long mid = lo + (hi - lo) / 2;
    if (func(mid, arr, tar)) {
      hi = mid;
    } else {
      lo = mid + 1;
    }
  }
  return lo;
}
void write(vector<long long>& arr) {
  for (auto it : arr) cout << it << " ";
  cout << '\n';
}
void A() {
  long long n = ct();
  long long kk = ct();
  long long rec;
  set<long long> st;
  for (long long j = (0); j < (n); ++j) {
    rec = ct();
    st.insert(rec);
  }
  vector<long long> temp(st.size());
  auto it = st.begin();
  for (long long j = (0); j < (st.size()); ++j) {
    temp[j] = *it;
    it++;
  }
  sort(temp.begin(), temp.end());
  vector<long long> arr;
  long long ma = 0;
  for (long long j = (1); j < (temp.size()); ++j) {
    arr.push_back((temp[j] - temp[j - 1]) / 2);
    ma = max(ma, temp[j] - temp[j - 1] - 1);
  }
  long double prob = 0;
  if (temp[0] != 1) {
    arr.push_back(temp[0] - 1);
    ma = max(ma, temp[0] - 1);
  }
  if (temp[temp.size() - 1] != kk) {
    arr.push_back(kk - temp[temp.size() - 1]);
    ma = max(ma, kk - temp[temp.size() - 1]);
  }
  sort(arr.begin(), arr.end());
  reverse(arr.begin(), arr.end());
  long long ans = arr[0];
  if (arr.size() >= 2) {
    ans += arr[1];
  }
  if (temp.size() == 1 && kk == 1) {
    prob = 0;
  } else if (temp.size() == 2 && temp[0] == 1 && temp[temp.size() - 1] == kk) {
    prob = (kk - 2) / ((long double)kk);
  } else {
    sort(arr.begin(), arr.end());
    reverse(arr.begin(), arr.end());
    long long ans = arr[0];
    if (arr.size() >= 2) {
      ans += arr[1];
    }
    prob = max(ans, ma) / ((long double)kk);
  }
  cout << setprecision(8) << fixed << prob << '\n';
}
string inc(string& str) {
  long long n = str.length();
  bool flag = 0;
  for (long long j = n - 1; j >= 0; j--) {
    if (str[j] != '9') {
      str[j]++;
      flag = 1;
      break;
    } else {
      str[j] = '0';
    }
  }
  if (!flag) {
    str = "1" + str;
  }
  return str;
}
bool check(string y) {
  bool flag = 0;
  string temp;
  string ans = "";
  for (long long j = (1); j < (y.length()); ++j) {
    for (long long k = (0); k < (j); ++k) {
      temp.push_back(y[k]);
    }
    ans = "";
    while (ans.length() < y.length()) {
      ans += temp;
      temp = inc(temp);
    }
    if (ans == y) {
      flag = 1;
      break;
    }
    temp.clear();
  }
  return flag;
}
void B() {
  long long y;
  cin >> y;
  for (long long j = (y + 1); j < (1234568); ++j) {
    string temp = to_string(j);
    if (check(temp) == 1) {
      cout << temp << '\n';
      break;
    }
  }
}
void C() {}
int32_t main() {
  long long tt = 1;
  for (long long ii = (0); ii < (tt); ++ii) {
    long long n = ct();
    string str;
    cin >> str;
    string res = "";
    long long len = n;
    long long ans = 0;
    for (long long j = (0); j < (n - 1); ++j) {
      if ((j - ans) % 2 == 0) {
        if (str[j] == str[j + 1]) {
          ans += 1;
          len -= 1;
        } else {
          res.push_back(str[j]);
        }
      } else {
        res.push_back(str[j]);
      }
    }
    if (len % 2 == 1) {
      ans++;
    } else {
      if (len != 0) res.push_back(str[n - 1]);
    }
    cout << ans << '\n';
    cout << res << '\n';
  }
  return 0;
}
