import math, sequtils, strformat, strutils, sugar proc parseTuple(x: string): (int, float64) = if '.' notin x: return (parseInt x, 0.0) let idx = x.find '.' a = parseInt x[..(idx-1)] b = parseFloat "0." & x[idx+1..^1] if x[0] != '-': return (a, b) else: return (a, -b) let n = parseInt stdin.readLine seq1 = newSeq.collect: for _ in 0 ..< n: parseTuple stdin.readLine ans1 = sum seq1.mapIt it[0] ans2 = sum seq1.mapIt it[1] (a, b) = parseTuple $ans2 stdout.write ans1 + a echo (&"{b:.10f}")[1..^1]