eolymp
bolt
Try our new interface for solving problems
Problems

Squares and Rounds

Squares and Rounds

\textit{I hear, brother, the war will be,} \textit{Cold, wet, long and wicked.} \textit{The Squares will fight against Rounds} \textit{Because they are smooth.} \textit{Ensemble "Skryabin"} The leader of Squares, being in the heat of passion, gave to each of his fighters so large dose of Ozverin (its a type of drug) that each of them first attack, and then decides, does he attack a Square or Round person. Rounds never know how to fight hand to hand, but they possess some magic tricks. The troop of \textbf{s} Squares attacked the village where \textbf{r} Rounds lived. As a consequence of Ozverin imposition and magic tricks of Rounds, it appeared that the fight takes place by such rules. Every minute, a randomly pair of creatures is chosen, and: \begin{itemize} \item if Round and Square are chosen, the Square kills the Round and fights further; \item if two Rounds are chosen, they apologize to each other and fight further; \item if two Squares are chosen, they kill each other. \end{itemize} The pair is chosen uniformly at random among all living creatures, so that there were two different beings (possibly the same species). For example, when two Squares and one Round are alive, then with equal probability of \textbf{1/3} the fight takes place between the \textbf{1}st Square and Round, or the \textbf{2}nd Square and Round, or the \textbf{1}st and the \textbf{2}nd Square. In the first two cases the Square wins, and in the third all the Squares die. Find the probability that under these fight rules at least one Round will survive, and all Squares will die. \InputFile Two integers are given in one line - the number of Squares \textbf{s} (\textbf{1} ≤ \textbf{s} ≤ \textbf{2010}) and the number of Rounds \textbf{r} (\textbf{1} ≤ \textbf{r} ≤ \textbf{2010}). \OutputFile Print one number - the required probability (with a relative error less than \textbf{10^\{-9\}}).
Time limit 1 second
Memory limit 256 MiB
Input example #1
2 1
Output example #1
 3.3333333333333333E-0001