/**
 * Given the initial balance, expenses, and revenue,
 * calculate the net profit after a certain number of months.
 *
 * @param initialBalance The initial balance in the account.
 * @param expenses A list of integers representing the monthly expenses.
 * @param revenue A list of integers representing the monthly revenue.
 * @return The net profit after the given number of months.
 */
fun calculateProfit(initialBalance: Int, expenses: List<Int>, revenue: List<Int>): Int {

    var netProfit = 0
    val numMonths = minOf(expenses.size, revenue.size)
    var i = 0

    while (i < numMonths) {
        val monthlyProfit = revenue[i] - expenses[i]
        netProfit += monthlyProfit
        i++
    }

    return netProfit
}
/**
 * Given the initial balance, expenses, and revenue,
 * calculate the net profit after a certain number of months.
 *
 * @param initialBalance The initial balance in the account.
 * @param expenses A list of integers representing the monthly expenses.
 * @param revenue A list of integers representing the monthly revenue.
 * @return The net profit after the given number of months.
 */
fun calculateProfit(initialBalance: Int, expenses: List<Int>, revenue: List<Int>): Int {
/**
 * Given the initial balance, expenses, and revenue,
 * calculate the net profit after a certain number of months.
 *
 * @param initialBalance The initial balance in the account.
 * @param expenses A list of integers representing the monthly expenses.
 * @param revenue A list of integers representing the monthly revenue.
 * @return The net profit after the given number of months.
 */
fun calculateProfit(initialBalance: Int, expenses: List<Int>, revenue: List<Int>): Int {

    var netProfit = 0
    val numMonths = minOf(expenses.size, revenue.size)
    var i = 0

    while (i < numMonths) {
        val monthlyProfit = revenue[i] - expenses[i]
        netProfit += monthlyProfit
        i++
    }

    return netProfit
}