fun main(){ val n = readLine()!!.toInt() var pos = mutableListOf>() repeat(n){ val (x, y) = readLine()!!.split(" ").map{it.toInt()} pos.add(Pair(x,y)) } val (x1, y1) = pos[0] println(pos.zipWithNext{p2, p3 -> Math.abs((x1-p3.first)*(p2.second-p3.second)-(p2.first-p3.first)*(y1-p3.second))}.sum()) }