f"%1"="" f(x:y)|x<'&'='/':y|x<'0'='%':y|0<1=x:f y m@main=do n<-getLine;putStrLn$f$show(read$f$n::Rational);m