Dima worked all day and wrote down on a long paper strip his favorite number n consisting of l digits. Unfortunately, the strip turned out to be so long that it didn't fit in the Dima's bookshelf.

To solve the issue, Dima decided to split the strip into two non-empty parts so that each of them contains a positive integer without leading zeros. After that he will compute the sum of the two integers and write it down on a new strip.

Dima wants the resulting integer to be as small as possible, because it increases the chances that the sum will fit it in the bookshelf. Help Dima decide what is the minimum sum he can obtain.

Input

The first line contains a single integer l (2 ≤ l ≤ 100 000) — the length of the Dima's favorite number.

The second line contains the positive integer n initially written on the strip: the Dima's favorite number.

The integer n consists of exactly l digits and it does not contain leading zeros. Dima guarantees, that there is at least one valid way to split the strip.

Output

Print a single integer — the smallest number Dima can obtain.

Examples

Input


7
1234567


Output


1801


Input


3
101


Output


11

Note

In the first example Dima can split the number 1234567 into integers 1234 and 567. Their sum is 1801.

In the second example Dima can split the number 101 into integers 10 and 1. Their sum is 11. Note that it is impossible to split the strip into "1" and "01" since the numbers can't start with zeros.


import java.io.*;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.*;


public class Newbie {

    static InputReader sc = new InputReader(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        solver s = new solver();
        long t = 1;
        while (t > 0) {
            s.solve();
            t--;
        }
        out.close();
    }

   /* static class descend implements Comparator<pair1> {
        public int compare(pair1 o1, pair1 o2) {
            if (o1.pop != o2.pop)
                return (int) (o1.pop - o2.pop);
            else
                return o1.in - o2.in;
        }
    }*/

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer token;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
            token = null;
        }

        public String sn() {
            while (token == null || !token.hasMoreTokens()) {
                try {
                    token = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return token.nextToken();
        }

        public int ni() {
            return Integer.parseInt(sn());
        }

        public String snl() throws IOException {
            return br.readLine();
        }

        public long nlo() {
            return Long.parseLong(sn());
        }

        public double nd() {
            return Double.parseDouble(sn());
        }

        public int[] na(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = sc.ni();
            return a;
        }

        public long[] nal(int n) {
            long a[] = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = sc.nlo();
            return a;
        }
    }

    static class card {
        long a;
        int cnt;
        int i;

        public card(long a, int cnt, int i) {
            this.a = a;
            this.cnt = cnt;
            this.i = i;
        }
    }

    static class ascend implements Comparator<pair> {
        public int compare(pair o1, pair o2) {
            if (o1.a != o2.a)
                return (int) (o1.a - o2.a);
            else
                return (int) (o1.b - o2.b) * -1;
        }
    }

    static class extra {

        static boolean v[] = new boolean[100001];
        static List<Integer> l = new ArrayList<>();
        static int t;

        static void shuffle(int a[]) {
            for (int i = 0; i < a.length; i++) {
                int t = (int) Math.random() * a.length;
                int x = a[t];
                a[t] = a[i];
                a[i] = x;
            }
        }

        static void shufflel(long a[]) {
            for (int i = 0; i < a.length; i++) {
                int t = (int) Math.random() * a.length;
                long x = a[t];
                a[t] = a[i];
                a[i] = x;
            }
        }

        static long gcd(long a, long b) {
            if (b == 0)
                return a;
            else
                return gcd(b, a % b);
        }

        static boolean valid(int i, int j, int r, int c) {
            if (i >= 0 && i < r && j >= 0 && j < c) {
                // System.out.println(i+" /// "+j);
                return true;
            } else {
                //  System.out.println(i+" //f "+j);
                return false;
            }
        }

        static void seive() {
            for (int i = 2; i < 101; i++) {
                if (!v[i]) {
                    t++;
                    l.add(i);
                    for (int j = 2 * i; j < 101; j += i)
                        v[j] = true;
                }
            }
        }

        static int binary(LinkedList<Integer> a, long val, int n) {
            int mid = 0, l = 0, r = n - 1, ans = 0;
            while (l <= r) {
                mid = (l + r) >> 1;
                if (a.get(mid) == val) {
                    r = mid - 1;
                    ans = mid;
                } else if (a.get(mid) > val)
                    r = mid - 1;
                else {
                    l = mid + 1;
                    ans = l;
                }
            }
            return (ans + 1);
        }

        static long fastexpo(long x, long y) {
            long res = 1;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res *= x;
                }
                y = y >> 1;
                x = x * x;
            }
            return res;
        }

        static long lfastexpo(long x, long y, long p) {
            long res = 1;
            x = x % p;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res = (res * x) % p;
                }
                y = y >> 1;
                x = (x * x) % p;
            }
            return res;
        }

       /* void dijsktra(int s, List<pair> l[], int n) {
            PriorityQueue<pair> pq = new PriorityQueue<>(new ascend());
            int dist[] = new int[100005];
            boolean v[] = new boolean[100005];
            for (int i = 1; i <= n; i++)
                dist[i] = 1000000000;
            dist[s] = 0;
            for (int i = 1; i < n; i++) {
                if (i == s)
                    pq.add(new pair(s, 0));
                else
                    pq.add(new pair(i, 1000000000));
            }
            while (!pq.isEmpty()) {
                pair node = pq.remove();
                v[node.a] = true;
                for (int i = 0; i < l[node.a].size(); i++) {
                    int v1 = l[node.a].get(i).a;
                    int w = l[node.a].get(i).b;
                    if (v[v1])
                        continue;
                    if ((dist[node.a] + w) < dist[v1]) {
                        dist[v1] = dist[node.a] + w;
                        pq.add(new pair(v1, dist[v1]));
                    }
                }
            }
        }*/
    }

    static class pair {
        int a;
        int b;

        public pair(int a, int b) {
            this.a = a;
            this.b = b;
        }
    }

    static class pair1 {
        pair p;
        int in;

        public pair1(pair a, int n) {
            this.p = a;
            this.in = n;
        }
    }

    static int inf = 5000013;

    static class solver {
        DecimalFormat df = new DecimalFormat("0.00");
        extra e = new extra();
        int mod = 1000000007;
        boolean v[] = new boolean[1000001];

        void solve() throws IOException {
            int n=sc.ni();
            String s=sc.sn();
            char c[]=s.toCharArray();
            if(n==2)
            {
                if(c[1]=='0')
                    System.out.println(s);
                else
                    System.out.println((c[0]-'0')+(c[1]-'0'));
            }
            else if(n%2!=0)
            {
                int mid=n/2;
                if(c[mid]!='0' && c[mid+1]!='0')
                {
                    if(c[0]<c[mid])
                    {
                        BigInteger b1=new BigInteger(s.substring(0,mid+1));
                        BigInteger b2=new BigInteger(s.substring(mid+1));
                        System.out.println(b1.add(b2));
                    }
                    else if(c[0]>c[mid])
                    {
                        BigInteger b1=new BigInteger(s.substring(0,mid));
                        BigInteger b2=new BigInteger(s.substring(mid));
                        System.out.println(b1.add(b2));
                    }
                    else
                    {
                        BigInteger b1=new BigInteger(s.substring(0,mid+1));
                        BigInteger b2=new BigInteger(s.substring(mid+1));
                        BigInteger b3=new BigInteger(s.substring(0,mid));
                        BigInteger b4=new BigInteger(s.substring(mid));
                        BigInteger sum1=b1.add(b2);
                        BigInteger sum2=b3.add(b4);
                        if(sum1.compareTo(sum2)<0)
                            System.out.println(sum1);
                        else
                            System.out.println(sum2);
                    }
                }
                else if(c[mid]=='0' && c[mid+1]!='0')
                {
                    BigInteger b1=new BigInteger(s.substring(0,mid+1));
                    BigInteger b2=new BigInteger(s.substring(mid+1));
                    System.out.println(b1.add(b2));
                }
                else if(c[mid]!='0' && c[mid+1]=='0')
                {
                    BigInteger b1=new BigInteger(s.substring(0,mid));
                    BigInteger b2=new BigInteger(s.substring(mid));
                    System.out.println(b1.add(b2));
                }
                else if(c[mid]=='0' && c[mid+1]=='0')
                {
                    int in1=-1,in2=-1;
                    for(int i=mid+2;i<n;i++)
                    {
                        if(c[i]!='0')
                        {
                            in1=i;
                            break;
                        }
                    }
                    for(int i=mid-1;i>=0;i--)
                    {
                        if(c[i]!='0')
                        {
                            in2=i;
                            break;
                        }
                    }
                    //System.out.println(in1+" "+in2);
                    if(in1==-1 && in2==0)
                        System.out.println(s);
                    else
                    {
                        if(in1!=-1 && in2!=0)
                        {
                            BigInteger b1=new BigInteger(s.substring(0,in1));
                            BigInteger b2=new BigInteger(s.substring(in1));
                            BigInteger b3=new BigInteger(s.substring(0,in2));
                            BigInteger b4=new BigInteger(s.substring(in2));
                            BigInteger sum1=b1.add(b2);
                            BigInteger sum2=b3.add(b4);
                            if(sum1.compareTo(sum2)<0)
                                System.out.println(sum1);
                            else
                                System.out.println(sum2);
                        }
                        else if(in1!=-1 && in2==0)
                        {
                            BigInteger b1=new BigInteger(s.substring(0,in1));
                            BigInteger b2=new BigInteger(s.substring(in1));
                            BigInteger b3=new BigInteger(s);
                            BigInteger sum1=b1.add(b2);
                            if(sum1.compareTo(b3)<0)
                                System.out.println(sum1);
                            else
                                System.out.println(b3);
                        }
                        else if(in1==-1 && in2!=0)
                        {
                            BigInteger b1=new BigInteger(s.substring(0,in2));
                            BigInteger b2=new BigInteger(s.substring(in2));
                            BigInteger b3=new BigInteger(s);
                            BigInteger sum1=b1.add(b2);
                            if(sum1.compareTo(b3)<0)
                                System.out.println(sum1);
                            else
                                System.out.println(b3);
                        }
                    }
                }
            }
            else
            {
                int mid=n/2;
                if(c[mid]!='0')
                {
                    BigInteger b1=new BigInteger(s.substring(0,mid));
                    BigInteger b2=new BigInteger(s.substring(mid));
                    System.out.println(b1.add(b2));
                }
                else if(c[mid]=='0' && c[mid-1]!='0')
                {
                    if(c[mid+1]=='0')
                    {
                        BigInteger b1=new BigInteger(s.substring(0,mid-1));
                        BigInteger b2=new BigInteger(s.substring(mid-1));
                        System.out.println(b1.add(b2));
                    }
                    else
                    {
                        if(c[0]<c[mid-1])
                        {
                            BigInteger b1=new BigInteger(s.substring(0,mid+1));
                            BigInteger b2=new BigInteger(s.substring(mid+1));
                            System.out.println(b1.add(b2));
                        }
                        else if(c[0]>c[mid-1])
                        {
                            BigInteger b1=new BigInteger(s.substring(0,mid-1));
                            BigInteger b2=new BigInteger(s.substring(mid-1));
                            System.out.println(b1.add(b2));
                        }
                        else
                        {
                            BigInteger b1=new BigInteger(s.substring(0,mid+1));
                            BigInteger b2=new BigInteger(s.substring(mid+1));
                            BigInteger b3=new BigInteger(s.substring(0,mid-1));
                            BigInteger b4=new BigInteger(s.substring(mid-1));
                            BigInteger sum1=b1.add(b2);
                            BigInteger sum2=b3.add(b4);
                            if(sum1.compareTo(sum2)<0)
                                System.out.println(sum1);
                            else
                                System.out.println(sum2);
                        }
                    }
                }
                else if(c[mid]=='0' && c[mid-1]=='0')
                {
                    int in1=-1,in2=-1;
                    for(int i=mid+1;i<n;i++)
                    {
                        if(c[i]!='0')
                        {
                            in1=i;
                            break;
                        }
                    }
                    for(int i=mid-2;i>=0;i--)
                    {
                        if(c[i]!='0')
                        {
                            in2=i;
                            break;
                        }
                    }
                    //System.out.println(in1+" "+in2);
                    if(in1==-1 && in2==0)
                        System.out.println(s);
                    else
                    {
                        if(in1!=-1 && in2!=0)
                        {
                            BigInteger b1=new BigInteger(s.substring(0,in1));
                            BigInteger b2=new BigInteger(s.substring(in1));
                            BigInteger b3=new BigInteger(s.substring(0,in2));
                            BigInteger b4=new BigInteger(s.substring(in2));
                            BigInteger sum1=b1.add(b2);
                            BigInteger sum2=b3.add(b4);
                            if(sum1.compareTo(sum2)<0)
                                System.out.println(sum1);
                            else
                                System.out.println(sum2);
                        }
                        else if(in1!=-1 && in2==0)
                        {
                            BigInteger b1=new BigInteger(s.substring(0,in1));
                            BigInteger b2=new BigInteger(s.substring(in1));
                            BigInteger b3=new BigInteger(s);
                            BigInteger sum1=b1.add(b2);
                            if(sum1.compareTo(b3)<0)
                                System.out.println(sum1);
                            else
                                System.out.println(b3);
                        }
                        else if(in1==-1 && in2!=0)
                        {
                            BigInteger b1=new BigInteger(s.substring(0,in2));
                            BigInteger b2=new BigInteger(s.substring(in2));
                            BigInteger b3=new BigInteger(s);
                            BigInteger sum1=b1.add(b2);
                            if(sum1.compareTo(b3)<0)
                                System.out.println(sum1);
                            else
                                System.out.println(b3);
                        }
                    }
                }
            }
        }
    }
}