import Foundation let count = Int(readLine()!)! let input = readLine()! print(input.reduce(0){ Int(String($0))! + Int(String($1))! })