minutes = [1, 2, 3] total = 0 minutes.each { |value| total += value } puts total