scan [read stdin] %d:%d:%d n m r while \$n {puts $m set m [expr $m+$m*$r/100] incr n -1}