#include <bits/stdc++.h>   using namespace std;   string pad(string x, int lngth) {     reverse(x.begin(), x.end());     for (int i = 0; i < lngth; i++) x +=  0 ;     reverse(x.begin(), x.end());     return x;   }   string add(string x, string y) {     string res =   ;     int mx = max(x.length(), y.length());     x = pad(x, mx - x.length());     y = pad(y, mx - y.length());     reverse(x.begin(), x.end());     reverse(y.begin(), y.end());     int carry = 0, tmp;     for (int i = 0; i < x.length(); i++) {       tmp = (x[i] -  0 ) + (y[i] -  0 ) + carry;       res += ((tmp % 10) +  0 );       carry = tmp / 10;     }     if (carry != 0) res += (carry +  0 );     reverse(res.begin(), res.end());     if (res[0] ==  0 ) {       int i = 0;       while (res[i] ==  0 ) i++;       res = res.substr(i, res.length());     }     return res;   }   string smaller(string x, string y) {     int i, mx = max(x.length(), y.length());     string x_ = pad(x, mx - x.length());     string y_ = pad(y, mx - y.length());     for (i = 0; i < x_.length(); i++) {       if (x_[i] > y_[i])         return y;       else if (x_[i] < y_[i])         return x;     }     return x;   }   int main() {     ios::sync_with_stdio(0);     int i, n;     string s, x, y;     cin >> n >> s;     int m = n / 2;     string p1, p2, res, ans =   ;     bool zero_found = false;     for (i = 0; i < m; i++) {       if (s[m + i] !=  0 )         break;       else         zero_found = true;     }     if (!zero_found) {       ans = add(s.substr(0, m), s.substr(m, n));       ans = smaller(ans, add(s.substr(0, m + 1), s.substr(m + 1, n)));     } else       ans = add(s.substr(0, m + i), s.substr(m + i, n));     zero_found = false;     for (i = 0; i < m; i++) {       if (s[m - i] !=  0 )         break;       else         zero_found = true;     }     if (!zero_found)       ans = smaller(ans, add(s.substr(0, m - 1), s.substr(m - 1, n)));     else       ans = smaller(ans, add(s.substr(0, m - i), s.substr(m - i, n)));     cout << ans <<   n ;     return 0;   }   