import math, sequtils, strutils, sugar let n = parseInt readLine stdin xs = newSeq.collect: for _ in 0 ..< n: let cd = stdin.readLine.split.map parseInt c = cd[0] d = cd[1] c.succ div 2 * d echo sum xs