object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val diceCount = sc.nextInt()
    val window = sc.nextInt()
    val dices = Array.fill(diceCount)(dice2expectation(sc.nextInt()))

    val ans = 0
      .to(diceCount - window)
      .map { index =>
        (0.until(window)).map(i => dices(index + i)).iterator.sum
      }
      .max

    println(ans)
  }

  def dice2expectation(dice: Int): Double = {
    val sum: Double = (dice.toDouble * (dice + 1)) / 2
    sum / dice.toDouble
  }
}
