object Main {
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt()
    val stations:List[List[Int]] = List.fill(n-1)(List.fill(3)(sc.nextInt))

    val answers = stations.zipWithIndex.map{ case (station:List[Int], i: Int) =>
      station(0) + station(1) + (station(2) * (n - i - 2))
    }

    answers.foreach(println)
    println(0)
  }
}