fun main(args : Array<String>) {
    val N = readLine()!!.toInt()
    val inputList = readLine()!!.split(" ").map { it.toInt() }
    //val lcm = inputList.reduce { a, b -> lcm(a, b) }
    //println(lcm)

    val sum = inputList.sum()

    println(sum - N)
}