import strutils, sequtils proc main() = let n = stdin.readLine.strip.parseInt s = stdin.readLine.strip var ans: int64 = 0 for i in 0..