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.
'''
t= input()
lng= len(t)
li1=[]; li2=[]
for i in range(lng):
    if t[i]!='a':
        li1.append(t[i])
    elif t[i]=='a':
        li2.append(i)
        
aa= ''.join(li1)
if len(aa)==0:
    print(t); exit(0)
if len(aa)%2==1:
    print(':('); exit(0)
if len(aa)%2==0:
    #print(123)
    l= int(len(aa)/2); lp= l#; print(l)
    ll= aa[l:]; lll=aa[0:l] #; print(ll)
    if ll!=lll:
        print(':('); exit(0)
    if ll not in t:
        print(':('); exit(0)
    tp= t[::-1]; tc= ll[::-1]#; print(tp,tc)
    if tp.find(tc)!=0:
        print(':('); exit(0)
    if tp.find(tc)==0:
        ul= len(tc)
        lu= tp[ul:][::-1]
        print(lu); exit(0)
        
   '''
#print(ord("T")-ord('A')+1)
'''
def fk (a):
    if a=='ACTG':
        return 0
   # print(a)
    cv=0
   # cv+= min(abs(ord(a[0])-ord('A')), (ord('A')-ord('A')+1+ 26- ord(a[0])))
    cv+= (min(abs(ord(a[0])-ord('A')), (ord('A')-ord('A')+1+ 26- (ord(a[0])-ord('A')+1) ), (ord(a[0])-ord('A')+ abs(27- (ord("A")-ord('A')+1)) ) ))
    
   # cv+= min(abs(ord(a[1])-ord('C')), (ord('C')-ord('A')+1+ 26- ord(a[1])))
    cv+= (min(abs(ord(a[1])-ord('C')), (ord('C')-ord('A')+1+ 26- (ord(a[1])-ord('A')+1) ), (ord(a[1])-ord('A')+ abs(27- (ord("C")-ord('A')+1)) ) ))
    
    #cv+= min(abs(ord(a[2])-ord('T')), (ord('T')-ord('A')+1+ 26- ord(a[2])))#; print(abs(ord(a[2])-ord('T')), (ord('T')-ord('A')+1+ 26- ord(a[2])))
    cv+= (min(abs(ord(a[2])-ord('T')), (ord('T')-ord('A')+1+ 26- (ord(a[2])-ord('A')+1) ), (ord(a[2])-ord('A')+ abs(27- (ord("T")-ord('A')+1)) ) ))
    
    #cv+= min(abs(ord(a[3])-ord('G')), (ord('G')-ord('A')+1+ 26- ord(a[3])))
    cv+= (min(abs(ord(a[3])-ord('G')), (ord('G')-ord('A')+1+ 26- (ord(a[3])-ord('A')+1) ), (ord(a[3])-ord('A')+ abs(27- (ord("G")-ord('A')+1)) ) ))
    
    return cv

n= int(input()); s=input(); li=[]
for i in range(n-4+1):
    ab= s[i:i+4]
    li.append(fk(ab))
li.sort()
print(li[0])
'''
'''
n= int(input())
li= list(map(str, input().split())); li= li*2; li= ''.join(li); li= li.replace('0',' ')
li1= li.split()
try:
    print(len(max(li1)))
except:
    print(0)'''

'''
from math import *

def prmfct(n):
    li=[]
    while n%2==0:
        li.append(2)
        n= n/2
    for i in range(3,int(sqrt(n))+1,2):
        while n%i==0:
            li.append(int(i))
            n=int(n/i)
    if n>2:
        li.append(int(n))
        
        
    return li


n,m= input().split(); n,m= int(n), int(m)

if m%n!=0:
    print(-1)
else:
    lim= prmfct(int(m/n))
    li= list(set(lim))
    if len(li)==2 and li[0]==2 and li[1]==3:
        print(len(lim))
    elif len(li)==1 and (li[0]==2 or li[0]==3):
        print(len(lim))
    elif len(li)==0:
        print(0)
    else:
        print(-1)'''
'''
from math import *
a,b= input().split(); a,b= int(a), int(b)
print(factorial(min(a,b)))'''

#from math import *
#def fact(n):
#    li=[]
#    for i in range(1,int(sqrt(n))+1):
#        if n%i==0:
#            li.append(i)
#            if i!=n/i:
#                li.append(int(n/i))
#    li.sort()
#    return li
#
#n= int(input())
#li1= list(map(int, input().split()))
#ab= max(li1)
#li2= fact(ab)
#li3= list(i for i in li1 if i not in li2)
#li4= list(set(list(i for i in li1 if li1.count(i)==2)))
#li3.extend(li4)
#print(ab, max(li3))





## A Python program to print all  
## permutations of given length 
#from itertools import permutations 
#  
## Get all permutations of length 2 
## and length 2 
#perm = permutations([1, 2, 3,4,5,6,7,8,9,0], 4) 
#j=1
## Print the obtained permutations 
#for i in list(perm):
#    li= list(i)
#    li[0]=str(li[0]); li[1]=str(li[1]); li[2]=str(li[2]); li[3]=str(li[3])
#    ab= ''.join(li)
#    print(str(j)+' ' 'Kornopuli'+ab); j+=1



#n= int(input()); li1= list(map(int, input().split())); li3=[]; baal_falan=0
#if n==1:
#    if li1[0]==0:
#        print(0); exit(0)
#    else:
#        print(1); exit(0)
#
#for i in range(n):
#    if li1[i]==1:
#        li3.append(1)
#    else:
#        if i==0:
#            baal_falan=1
#        elif i==n-1:
#            baal_falan=1
#        else:
#            if li1[i+1]==0 or li1[i-1]==0:
#                baal_falan=1
#            else:
#                li3.append(1)
#                
#print(len(li3))

#n= int(input()); s= input(); s= s+'0'; li= list(s); baal_falan=0; cn=0; sv=['R','G','B']
#for i in range(n):
#    if li[i]!=li[i+1]:
#        baal_falan=1
#    else:
#        cn+=1
#        if sv[0]!=li[i] and sv[0]!=li[i+2]:
#            li[i+1]= sv[0]
#        elif sv[1]!=li[i] and sv[1]!=li[i+2]:
#            li[i+1]= sv[1]
#        elif sv[2]!=li[i] and sv[2]!=li[i+2]:
#            li[i+1]= sv[2]
#print(cn); print(''.join(li[0:n]))


#li=[1,5,8,7,4,6,8,2,3,4]
#print(li.index(8))

# print(ord('z')-ord('a'))

#n= int(input()); s= input(); li1=[]; li2=[]; li3=[0]*26; cn=0; bl_falan=0
#for i in s:
#    if i>='A' and i<='Z':
#        li1.append(i)
#    else:
#        li2.append(i)
#        
#for i in range(n-1):
#    if li1[i].lower()==li2[i]:
#        bl_falan=1
#    else:
#        ab= li1[i].lower()
#        #li3.append(li2[i])
#        li3[ord(li2[i])-ord('a')]+=1
#        if li3[ord(ab)-ord('a')]==0 and li1 in : #ab not in li3:
#            cn+=1
#        else:
#            li3[ord(ab)-ord('a')]-=1 
#            
#print(cn)


# bodda shap
'''
a,b,c,d,e,f= 1,1,0,0,0,0
n,m= input().split(); n,m= int(n),int(m)
if m==1 or m==2:
    print('Yes')
    exit(0)
    
x,y= input().split(); x,y= int(x),int(y); cc=0; dd=0; nc=0; nd=0; ee,ff=0,0; ne,nf= 0,0

for i in range(m-1):
    xx,yy= input().split(); xx,yy= int(xx), int(yy);  dn=0; dnn=0
    if xx==x:
        a+=1
        dn=1
#    if xx==y:
#        b+=1
#        dn=1
    if yy==x:
        a+=1; dn=1
#    if yy==y:
#        b+=1; dn=1
    if dn==0 and nc==0 and nc==0:
        cc= xx; dd= yy; nc=1; nd=1; c+=1; d+=1
        
    elif dn==0 and nc==1 and nd==1:
        if xx==cc:
            c+=1
        if xx==dd:
            d+=1
        if yy==cc:
            c+=1
        if yy==dd:
            d+=1
    
    ##############################
            
    if xx==y:
        b+=1
        dnn=1
    if yy==y:
        b+=1; dnn=1
    
    if dnn==0 and ne==0 and nf==0:
        ee= xx; ff= yy; ne=1; nf=1; e+=1; f+=1
    
    elif dnn==0 and ne==1 and nf==1:
        if xx==ee:
            e+=1
        if xx==ff:
            f+=1
        if yy==cc:
            e+=1
        if yy==dd:
            f+=1
    
    
if a+c==m or a+d==m or b+e==m or b+f==m:
    print('Yes')
else:
    print('No')
    
#print(a+c, a+d, b+e, b+f, b,f)
'''
#n= int(input())
#li= list(map(int, input().split())); li2=[]
#for i in range(102):
#    cn=0
#    for j in range(n):
#        cn+= abs(i- li[j])
#        if li[j]>i or li[j]<i:
#            cn-=1
#        #print (cn, end=' ')
#    li2.append(cn); cn=0
#li2[0]= 1000000
#ab= min(li2); ba= li2.index(ab)
#
#print(ba, ab)
##print(li2)

## game with string- stack
#s= input(); lg= len(s); li=[]; cn=0
#
#for i in range(lg):
#    if len(li)!=0:
#        if s[i]==li[-1]:
#            li.pop(-1)
#            cn+=1
#        else:
#            li.append(s[i])
#    else: li.append(s[i])
#if cn%2==1:
#    print('Yes')
#else:
#    print('No')

# alarm clock everywhere
##from math import *
##def gcd_of_list(li):
##    if len(li)==1:
##        return li[0]
##    elif len(li)==2:
##        return gcd(li[0], li[1])
##    g= gcd(li[0], li[1])
##    
##    for i in range(2, len(li)):
##        g= gcd(g, li[i])
##    return g
##        
##n,m= input().split(); n,m= int(n), int(m); lix= list(map(int, input().split())); lip= list(map(int, input().split()))
##p= lix[0]; q=0; lig=[]
##for i in range(1,n):
##    lig.append(lix[i]-lix[i-1])
##    
##ap= gcd_of_list(lig)
###lip.sort()
##for j in range(m):
##    if ap%lip[j]==0:
##        q= j+1; print('YES')
##        print(p,q)
##        exit(0)
##print('NO')

#import struct
#print(dir(struct))
##print(imp.sqrt(25))

# amr and music
##def fking(li):
##    return li[0]
##
##n,k= input().split(); n,k= int(n), int(k); li1= list(map(int, input().split())); li2=[]
##for i in range(n):
##    tl= (li1[i], i)
##    li2.append(tl)
##
##li2.sort(key=fking)
##
##cn1=0; cn2=0; li3=[]
##
##for i in range(n):
##    if cn2+ li2[i][0] <=k:
##        cn1+=1
##        li3.append(li2[i][1]+1)
##        cn2+= li2[i][0]
##    else: break
##    
##if cn1==0:
##    print(0)
##else:
##    print(cn1)
##    otpt= ' '.join(str(i) for i in li3)
##    print(otpt)
    
# ibonny and ivory- mathematical- ax + by ==c checking, while a,b,c given
##a,b,c= list(map(int, input().split()))
##x= int(c/(a+b))
##for i in range(x+1):
##    st=  c- (a+b)*i
##    if st%a==0 or st%b==0:
##        print('Yes'); exit(0)
##        
##print('No')



##n,k = input().split(); n,k = int(n), int(k); lia= list(map(int, input().split())); cn=0
##for i in range(n-1):
##    if lia[i]+lia[i+1]<k:
##        at =  k- lia[i]- lia[i+1]
##        lia[i+1]+= k- lia[i]- lia[i+1]; cn+= at
##print(cn)
##print(' '.join(str(i) for i in lia))







#cm, fizzbuzz extreme, rte

##t= int(input())
##for i in range(1,t+1+1):
##    if i==t+1:
##        exit(0)
##    a=0
##    b=0
##    s= input()
##    lg= len(s)
##    ck=0
##    for j in range(lg):
##        ck+= int(s[j])
##        if j== lg-1:
##            if s[j]=='5' or s[j]=='0':
##                b=1
##            
##    if ck%3==0:
##        a=1
##    if a==1 and b==0:
##        print('Case'+ ' '+ str(i)+':'+ ' '+ 'Fizz')
##    elif b==1 and a==0:
##        print('Case'+ ' '+ str(i)+':'+ ' '+ 'Buzz')
##    elif a==1 and b==1:
##        print('Case'+' '+ str(i)+':'+ ' '+ 'FizzBuzz')
##    else:
##        print('Case'+' '+ str(i)+':'+ ' '+ 'Null')

##
#def tabba(s,t):
#    ls= len(s); lt= len(t); li=[]; li.append(-1)
#    if ls<lt:
#        return 0
#    if ls==lt:
#        if s==t:
#            return 1
#        else: return 0
#    for i in range(ls-lt+1):
#        bb= s[i:lt+i]
#        #print(bb)
#        if bb==t:
#            li.append((i+1, lt+1))
#    return li
###    
###    
###    
###    
#n,m,q= list(map(int, input().split())); s= input(); t= input()
#for i in range (q):
#    a,b= list(map(int, input().split()))
#    #print(tabba(s[a-1:b], t))
#    if tabba(s[a-1:b], t)==0:
#        print(0)
#    elif tabba(s[a-1:b], t)==1:
#        print(1)
#    else:
#        print(len(tabba(s[a-1:b], t))-1)
#

#a, b = map(int, input().split())
#ans = a
#while a >= b:
#    #ans += a//b
#    a += a%b
#    ans+= a//b
#    a = a//b
#print(int(ans))


#a= 5.4878
#print(round(a,0))

#from math import *
#def decimal_position(a,b):
#    if floor(a)==ceil(a):
#        m= '0'*b; n= str(a)
#        return str(int(a))+'.'+m
#    else:
#        t= str(a)
#        li= (t.split('.')); p= li[1]
#        if len(p)<b:
#            aa= '0'*(b-len(p))
#            return li[0]+'.'+li[1]+aa
#        elif len(p)==b:
#            return li[0]+'.'+li[1]
#        elif len(p)>b:
#            ad= (round(a,b))*1.0
#            da= (str(ad).split('.')); dada= da[1]
#            if len(dada)==b:
#                return ad
#            else:
#                bbc= '0'*(b-len(dada))
#                return str(ad)+bbc
#            
          
#def Case_number(n):
#    return str('Case'+' '+str(n)+':'+' ')




#a,b= b,a
#a,b= 5,4
#a,b,c= 7,8,9
    
#a,b= [7,8]
#print(a,b)

#a,b= [7,8,9]
#print(a,b)

#st= input()
#ab= int(input())
#print(st)
#print(ab)

#st= input()
#st1= input()

#ab= int(input())
#ab1= int(input())

#st= input()
#li1= st.split()
#a,b = li1
#print(a)
#print(b)

#a,b= st.split()
#a,b= input().split()
#print(a)
#print(b)

#a,b,c= input().split()
#a,b,c= int(a),  int(b),  int(c)
#print(a+b+c)

#li1= list('babul')
#print(li1)

#li1= list(1,7,8,5)
#print(li1)

#a,b,c= input().split()
#a,b,c= int(a),  int(b),  int(c)
#print(a+b+c)

#a,b,c= map(int,input().split())
#print(a+b+c)

#li1= map(int, input().split())
#print(li1)

#li1= map(int, input().split())
#li2= list(li1)
#print(li2)

#li1= list( map( int, input().split() ) )
#print(li1)

#####

#li1= [5,4,6,8]
#print(li1)

#li1= ['a','b','c','d']
#for i in range(len(li1)):
#    print(li1[i])

#li1= ['a','b','c','d']
#st= ' '.join(li1)
#print(st)

#li1= [5,4,7,8,9]
#st= ' '.join(li1)
#print(st)

#li1= [5,4,7,8,9]
#for i in range(len(li1)):
#    li1[i]= str(li1[i])
#st= ' '.join(li1)
#print(st)

#li1= [5,4,7,8,9]
#for i in range(len(li1)):
#    li1[i]= str(li1[i])
#st= ''.join(li1)
#print(st)
#
#li1= [5,4,7,8,9]
#for i in range(len(li1)):
#    li1[i]= str(li1[i])
#st= ','.join(li1)
#print(st)
#
#a= 10
#b= 12
#c= 8
#print(a,b,c)



#t= int(input())
#for i in range(t):
#    n= int(input())
#    a,b,c=0,0,0
#    while n%2==0:
#        a+=1
#        n= int(n//2)
#        #print(n)
#    while n%3==0:
#        b+=1
#        n= int(n//3)
#    while n%5==0:
#        c+=1
#        n= int(n//5)
#    if n!=1:
#        print(-1)
#    else: print(a+2*b+3*c)
#    elif n in as if is not in
    

'''

ara=list(map(int, input().split()))

tree= [-1]*4*len(ara)

def build_tree(node, b,e):
    if b==e:
        tree[node]= ara[b]; return ;
    left= node*2; right= node*2+1; mid= (b+e)//2
    build_tree(left, b,mid); build_tree(right,mid+1,e)
    tree[node]= tree[left]+ tree[right]
    
def tree_query(node, b,e, i,j):
    if i>e or j<b:
        return 0
    if b>=i and e<=j:
        return tree[node]
    left= node*2; right= node*2+1; mid=(b+e)//2
    p1= tree_query(left, b, mid,i,j)
    p2= tree_query(right, mid+1,e, i,j)
    return p1+p2
def update_query(node, b,e, i, newval):
    if e<i or b>i:
        return;
    if b==e and b==i:
        tree[node]= newval; return;
    left= node*2; right= node*2+1; mid= (b+e)//2
    update_query(left, b,mid, i,newval)
    update_query(right, mid+1,e, i,newval)
    tree[node]= tree[left]+tree[right]
    
build_tree(1,0,len(ara)-1)

for i in range(1,4*len(ara)):
    if tree[i]!=-1:
        print(tree[i], end=' ')
print()
#for i in range(0):
   # a,b= map(int, input().split())
   # print(tree_query(1,0,len(ara)-1, a,b))
update_query(1,0,len(ara)-1, 2,1)
print(tree_query(1,0, len(ara)-1, 1,3))

'''        
'''
n,q= list(map(int, input().split()))
ara=[0]*(n); tree=[0]*((n)*4)

def build_tree(node, b,e):
    if b==e:
        if ara[b]%3==0:
            tree[node]+=1
        return ;
    left= node*2; right= node*2+1; mid= (b+e)//2
    build_tree(left, b,mid); build_tree(right,mid+1,e)
    tree[node]= tree[left]+ tree[right]
    
def update_query(node, b,e, i,j):
    if e<i or b>j:
        return;
    if b==e and b>=i and e<=j:
        if ara[b]%3==2:
            tree[node]+=1
            ara[b]+=1
        elif ara[b]%3==1:
            ara[b]+=1
        else:
            tree[node]-=1
            if tree[node]<0: tree[node]=0
            ara[b]+=1
        return;
    left= node*2; right= node*2+1; mid= (b+e)//2
    update_query(left, b,mid, i,j)
    update_query(right, mid+1,e, i,j)
    tree[node]= tree[left]+tree[right]
    
def tree_query(node, b,e, i,j):
    if i>e or j<b:
        return 0
    if b>=i and e<=j:
        return tree[node]
    left= node*2; right= node*2+1; mid=(b+e)//2
    p1= tree_query(left, b, mid,i,j)
    p2= tree_query(right, mid+1,e, i,j)
    return p1+p2

build_tree(1,0,n-1)
for i in range(q):
    c,a,b= list(map(int, input().split()))
    if c==0:
        update_query(1,0,n-1,a,b)
    else:
        print(tree_query(1,0,n-1,a,b))
'''
#n,q= list(map(int, input().split()))
#ara=list(map(int, input().split()))
#
#tree= [-1]*4*len(ara)
#
#def build_tree(node, b,e):
#    if b==e:
#        tree[node]= ara[b]; return ;
#    left= node*2; right= node*2+1; mid= (b+e)//2
#    build_tree(left, b,mid); build_tree(right,mid+1,e)
#    tree[node]= min(tree[left], tree[right])
#    
#def tree_query(node, b,e, i,j):
#    if i>e or j<b:
#        return 1000000
#    if b>=i and e<=j:
#        return tree[node]
#    left= node*2; right= node*2+1; mid=(b+e)//2
#    p1= tree_query(left, b, mid,i,j)
#    p2= tree_query(right, mid+1,e, i,j)
#    return min(p1,p2)
#def update_query(node, b,e, i, newval):
#    if e<i or b>i:
#        return;
#    if b==e and b==i:
#        tree[node]= newval; return;
#    left= node*2; right= node*2+1; mid= (b+e)//2
#    update_query(left, b,mid, i,newval)
#    update_query(right, mid+1,e, i,newval)
#    tree[node]= min(tree[left],tree[right])
#
#build_tree(1,0,n-1)
#for _ in range(q):
#    q,a,b= input().split(); a,b= int(a),int(b)
#    if q=='q':
#        print(tree_query(1,0,n-1,a-1,b-1))
#    if q=='u':
#        update_query(1,0,n-1, a-1,b) 

'''
# lazy prop
ara=list(map(int, input().split()))
ln= len(ara)
tree= [0]*4*len(ara); lazy= [0]*4*len(ara)

def build_tree(node, b,e):
    if b==e:
        tree[node]= ara[b]; return ;
    left= node*2; right= node*2+1; mid= (b+e)//2
    build_tree(left, b,mid); build_tree(right,mid+1,e)
    tree[node]= tree[left]+ tree[right]
def update(node, b,e, i,j, x):
    if lazy[node]!=0:
        tree[node]+= (e-b+1)*lazy[node]
        if b!=e:
            lazy[node*2]+= lazy[node]
            lazy[node*2+1]+= lazy[node]
        lazy[node]=0    
    if i>e or b>j: return;
    if b>=i and e<=j:
        tree[node]+= (e-b+1)*x
        if b!=e:
            lazy[node*2]+= x; lazy[node*2+1]+=x
        return;
    left= node*2; right= node*2+1; mid= (b+e)//2
    update(left, b,mid, i,j,x); update(right, mid+1,e, i,j,x)
    tree[node]= tree[left]+ tree[right]
    
def query(node, b,e, i,j):
    if lazy[node]!=0:
        tree[node]+= (e-b+1)*lazy[node]
        if b!=e:
            lazy[node*2]+= lazy[node]
            lazy[node*2+1]+= lazy[node]
        lazy[node]=0     
    if i>e or b>j: return 0;
    if b>=i and e<=j:
        return tree[node]
    left= node*2; right= node*2+1; mid= (b+e)//2
    p1= query(left, b,mid, i,j)
    p2= query(right, mid+1,e, i,j)
    return p1+p2
build_tree(1,0,ln-1)
#print(tree)
print(query(1,0,ln-1, 2,4))
update(1,0,ln-1, 3,5,2)
print(query(1,0,ln-1, 2,5))
'''
'''
tree=[]; lazy=[]
def update(node, b,e, i,j, x):    
    if lazy[node]!=0:
        tree[node]+= (e-b+1)*lazy[node]
        if b!=e:
            lazy[node*2]+= lazy[node]
            lazy[node*2+1]+= lazy[node]
        lazy[node]=0    
    if i>e or b>j: return;
    if b>=i and e<=j:
        tree[node]+= (e-b+1)*x
        if b!=e:
            lazy[node*2]+= x; lazy[node*2+1]+=x
        return;
    left= node*2; right= node*2+1; mid= (b+e)//2
    update(left, b,mid, i,j,x); update(right, mid+1,e, i,j,x)
    tree[node]= tree[left]+ tree[right]
def query(node, b,e, i,j):
    if lazy[node]!=0:
        tree[node]+= (e-b+1)*lazy[node]
        if b!=e:
            lazy[node*2]+= lazy[node]
            lazy[node*2+1]+= lazy[node]
        lazy[node]=0     
    if i>e or b>j: return 0;
    if b>=i and e<=j:
        return tree[node]
    left= node*2; right= node*2+1; mid= (b+e)//2
    p1= query(left, b,mid, i,j)
    p2= query(right, mid+1,e, i,j)
    return p1+p2

t= int(input())
for _ in range(t):
    n,c= list(map(int, input().split()))
    tree=[0]*(4*n); lazy= [0]*(4*n)     
    for __ in range(c):
        inp= list(map(int, input().split()))
        if inp[0]==0:
            update(1,0,n-1, inp[1]-1, inp[2]-1, inp[3])
        else:
            print(query(1,0,n-1, inp[1]-1, inp[2]-1))
 '''
'''
a,b,c,d,e,f,g,h,i,j,k,l= [9*1, 90*2, 900*3, 9000*4, 90000*5, 900000*6, 9000000*7, 90000000*8, 900000000*9, 9000000000*10, 90000000000*11, 900000000000*12]
a=a; b= a+b; c= b+c; d=c+d; e=d+e; f= e+f; g= f+g; h=g+h; i=h+i; j= i+j
k= j+k; l= k+l
li1=[0,a,b,c,d,e,f,g,h,i,j,k,l]
n= int(input()); nn=0
for ii in range(1,12):
    if li1[ii-1]<n and li1[ii+1]>n:
        nn= ii
        
n= n-li1[nn-1]
r1= 10**(nn-1)
n1= n//nn
r1+= n1-1
n2= n-(n1*nn)
if n2==0:
    print(str(r1)[-1])
else:
    #print(r1, n2-1)
    print(str(r1+1)[n2-1])
'''
'''
number = 241.5
sentence = ' The number is {0:.2f}'.format(number)
print(sentence)

# Convert base-10 decimal integers  
# to floating point numeric constants 
print ("This site is {0:f}% securely {1}!!". 
                    format(100, "encrypted")) 
  
# To limit the precision 
print ("My average of this {0} was {1:.2f}%"
            .format("semester", 78.234876)) 
  
# For no decimal places 
print ("My average of this {0} was {1:.0f}%"
            .format("semester", 78.234876)) 
  
# Convert an integer to its binary or 
# with other different converted bases. 
print("The {0} of 100 is {1:b}"
        .format("binary", 100)) 
          
print("The {0} of 100 is {1:o}"
        .format("octal", 100)) 
 '''
#li1=[[0 for i in range(5)] for j in range(6)]
'''
def ncr(n,k):
    dp= [[0 for i in range(k+1)]for j in range(n+1)]
    for i in range(n+1):
        for j in range(min(i,k)+1):
            if j==0 or j==i:
                dp[i][j]=1
            else:
                dp[i][j]= dp[i-1][j-1]+ dp[i-1][j]
    return dp[n][k]
print(ncr(30,5))
'''
'''    
def test(a):
    lis=[]
    for i in range(len(a)-1):
        if a[i][i]!=a[i+1][i]:
            if a[i][i]<a[i+1][i]: lis.append(a[i])
            else: lis.append( a[i+1])
        if a[i][i]==a[i+1][i]:
            if a[i][i+1]<a[i+1][i+1]: lis.append(a[i])
            else: lis.append(a[i+1])
    return lis
def ab(val):
    return val[0]

li=[[1,5],[5,4],[2,3]]
print(sorted(li,key=ab))
'''

'''
x,y,z= input().split()
x,z,y= int(x),int(z),int(y)

if x+y<z:
    print(0,0); exit(0)
if x+y==z:
    print(1,min(x,y)); exit(0)
f =  ( x+y)//z
a,b = x%z, y%z;
need= z- max(a,b)
if need<=min(a,b): print(f,need)
else: print(f,0)
'''
def kotogula_zero(n):
    
    ln= len(n)
    
    if ln%2==0:
        s= n[ln//2:ln]
        s1= str(int(s))
        #print(ln,s1,s)
        rt1= ln//2-len(s1)
        if s1=='0': rt1+=1
        ss= n[0:ln//2][::-1]
        ss1= str(int(ss))
        rt2= ln//2- len(ss1)
        if ss1=='0': rt2+=1
        return rt1,rt2

  

n= int(input());
s= input()
if n==2:
    print(int(s[0])+int(s[1]))
    exit(0)
if n%2==0:
    if s[n//2]!='0':
        print(int(s[0:n//2])+int(s[n//2:n]) )
        exit(0)
        
    else:
        nex,prev = kotogula_zero(s)[0],kotogula_zero(s)[1]
        kot= nex+ prev
        if n//2- prev ==1:
            print(int(s[0]+'0'*kot)+int(s[-1])); exit(0)
        #nex+=1
        if n//2- nex==0:
            print(int(s[0:(n//2-prev)-1])+int(s[(n//2)-prev-1:n]))
            exit(0)
        
       # print(n//2,nex)
        ab= int(s[0:(n//2+nex)])+int(s[(n//2)+nex:n]); ba=  int(s[0:(n//2-prev)-1])+int(s[(n//2)-prev-1:n]) 
        #print(ab,ba)
        if ab==int(s): print(ba)
        elif ba==int(s): print(ab)
        else: print(min(ab,ba))
        exit(0)
else:
    if s[n//2]!='0':
        
        print(min(int(s[0:n//2+1])+int(s[n//2+1:n]), int(s[0:n//2])+int(s[n//2:n])))
        exit(0)
    else:        
        ne,pr= kotogula_zero(s[0:n//2]+s[n//2+1:n])
        kot= ne+pr+1
        if n//2-pr==1:
            print(int(s[0]+'0'*kot)+int(s[-1])); exit(0)
        if n//2-ne==0:
            y= int(s[0:n//2-(pr+1)])+int(s[n//2-(pr+1):n])
            print(y); exit(0)
        ne1= 1+ne; pr1= 1+pr
        
        x= int(s[0:n//2+ne1])+int(s[n//2+ne1:n])
        y= int(s[0:n//2-pr1])+int(s[n//2-pr1:n])
        print(min(x,y))
        
        exit(0)
 

        


    
        


        





















































    















'''
Abdul Hamid Shaodagor High School   Joni Kanti Pal  01306261062 Redwan Haque Ratul  01846509454
Hasne Hena Girls High School   Saiyeda Shahinur Parveen    01819858004 Habibur Rahman  01825374474
''' 














        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
