/**
 * Given a dictionary representing a musician and the number of times they can play each instrument,
 * return the total number of instruments the musician can play.
 *
 * Example:
 * countInstruments(mapOf("guitar" to 3, "piano" to 2, "drums" to 1)) => 6
 *
 * @param musician A map with keys representing the instrument names (strings) and values
 * representing the number of times the musician can play that instrument.
 * @return The total number of instruments the musician can play.
 */
fun countInstruments(musician: Map<String, Int>): Int {

    var totalInstruments = 0
    
    for ((_, count) in musician) {
        totalInstruments += count
    }
    
    return totalInstruments
}
/**
 * Given a dictionary representing a musician and the number of times they can play each instrument,
 * return the total number of instruments the musician can play.
 *
 * Example:
 * countInstruments(mapOf("guitar" to 3, "piano" to 2, "drums" to 1)) => 6
 *
 * @param musician A map with keys representing the instrument names (strings) and values
 * representing the number of times the musician can play that instrument.
 * @return The total number of instruments the musician can play.
 */
fun countInstruments(musician: Map<String, Int>): Int {
/**
 * Given a dictionary representing a musician and the number of times they can play each instrument,
 * return the total number of instruments the musician can play.
 *
 * Example:
 * countInstruments(mapOf("guitar" to 3, "piano" to 2, "drums" to 1)) => 6
 *
 * @param musician A map with keys representing the instrument names (strings) and values
 * representing the number of times the musician can play that instrument.
 * @return The total number of instruments the musician can play.
 */
fun countInstruments(musician: Map<String, Int>): Int {

    var totalInstruments = 0
    
    for ((_, count) in musician) {
        totalInstruments += count
    }
    
    return totalInstruments
}