foreach a\ b [read stdin] {puts [expr round(log($a)/log($b))]}