/**
 * Given a list of positive integers, the function should use a break statement
 * within a loop to stop iterating when an element is found that is divisible
 * by 3. The function should return the total number of iterations performed
 * before the loop was stopped.
 *
 * @param lst A list of positive integers.
 * @return The total number of iterations performed before the loop was stopped.
 */
fun countBreaks(lst: List<Int>): Int {

    var count = 0
    for ((index, num) in lst.withIndex()) {
        // Add your code here
        if (num % 3 == 0) {
            break
        }
        
        count++
    }
    
    return count
}
/**
 * Given a list of positive integers, the function should use a break statement
 * within a loop to stop iterating when an element is found that is divisible
 * by 3. The function should return the total number of iterations performed
 * before the loop was stopped.
 *
 * @param lst A list of positive integers.
 * @return The total number of iterations performed before the loop was stopped.
 */
fun countBreaks(lst: List<Int>): Int {
/**
 * Given a list of positive integers, the function should use a break statement
 * within a loop to stop iterating when an element is found that is divisible
 * by 3. The function should return the total number of iterations performed
 * before the loop was stopped.
 *
 * @param lst A list of positive integers.
 * @return The total number of iterations performed before the loop was stopped.
 */
fun countBreaks(lst: List<Int>): Int {

    var count = 0
    for ((index, num) in lst.withIndex()) {
        // Add your code here
        if (num % 3 == 0) {
            break
        }
        
        count++
    }
    
    return count
}