str = "/" + gets if str=="#" then puts "0 0" end str.gsub!("(^^*)","l").gsub!("(*^^)","r") puts "#{str.count("l")} #{str.count("r")}"