let n = Int(readLine()!)! let a = readLine()!.split(separator: " ").map{Int($0)!} let c = a.reduce(0){$0 + $1} print((1 + n) * (n) / 2 - c)