Олимпиадный тренинг

Задача 38379. Dividing a number


Задача

Темы:
Today Dima tried hard all day and wrote out his favorite positive integer n, consisting of l digits, on a long paper tape. Unfortunately, the tape turned out to be so long that it didn't fit into Dima's closet.

To cope with this trouble, Dima decided to cut the tape into two non-empty parts, each of which contains a positive integer without leading zeros, then add the numbers written on the resulting parts, and write the resulting sum on a new tape.

Dima wants the resulting number to be as small as possible, because this increases the chances that at least the amount will fit into the closet. Help Dima find the minimum number he can get.

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

The second line contains a positive integer n, originally written on tape — Dima's favorite number.

The number n consists of exactly l digits, and the record does not contain leading zeros. Dima also guarantees that there is at least one way to cut a number that satisfies all the requirements above.

Imprint
Print a single integer — the minimum number Dima can get.

Note
In the first example Dima can cut the number 1234567 into numbers 1234 and 567. Their sum is 1801.

In the second example, Dima can cut the number 101 into numbers 10 and 1. Their sum is 11.
Examples
# Input Output
1 7
1234567
1801
2 3
101
11