Hidden Number

No attempts yetTime limit1sMemory limit256 MB

Problem

A word can hide numbers inside it. Each such number is called a hidden number. Given a word made of uppercase and lowercase letters and digits, write a program that computes the sum of every hidden number in the word.

A hidden number follows these rules:

  • A run of consecutive digits forms a single hidden number.
  • Between any two different hidden numbers there is at least one letter.
  • Each hidden number has at most 6 digits.

A hidden number's value is the integer read from its digits, so leading zeros are ignored (the run 07 counts as 7).

Input

The first line contains the length of the word nn (1n5,000,0001 \le n \le 5{,}000{,}000).

The second line contains the word, which consists only of uppercase and lowercase letters and digits (00-99).

Output

Print the sum of all hidden numbers in the word on a single line. If there are no hidden numbers, print 00.