#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
char ss[N];
int n;
int cnt;
bool tf = false;
int len, a[N];
int b[N], len1;
bool JD() {
  if (tf == false) return true;
  if (len < len1) return false;
  if (len > len1) return true;
  for (int u = 1; u <= len; u++) {
    if (a[u] < b[u]) return false;
    if (a[u] > b[u]) return true;
  }
  return true;
}
void check(int x) {
  if (ss[x + 1] == '0') return;
  cnt++;
  len1 = max(x, n - x);
  memset(b, 0, sizeof(b));
  int i = x, j = n;
  for (int u = len1; u >= 1; u--) {
    if (i >= 1) b[u] = b[u] + ss[i] - '0';
    if (j > x) b[u] = b[u] + ss[j] - '0';
    i--;
    j--;
  }
  for (int u = len1; u >= 1; u--) b[u - 1] = b[u - 1] + b[u] / 10, b[u] %= 10;
  if (b[0] != 0) {
    len1++;
    for (int u = len1; u >= 1; u--) b[u] = b[u - 1];
  }
  if (JD()) {
    len = len1;
    tf = true;
    for (int u = 1; u <= len; u++) a[u] = b[u];
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", ss + 1);
  cnt = 0;
  for (int u = n / 2; u >= 1; u--) {
    check(u);
    if (cnt >= 50) break;
  }
  cnt = 0;
  for (int u = n / 2; u < n; u++) {
    check(u);
    if (cnt >= 50) break;
  }
  for (int u = 1; u <= len; u++) printf("%d", a[u]);
  return 0;
}
