{"raw_statement":[{"iden":"problem statement","content":"You are given positive integers $A$ and $B$.\nYou will repeat the following operation until $A=B$:\n\n*   compare $A$ and $B$ to perform one of the following two:\n    *   if $A > B$, replace $A$ with $A-B$;\n    *   if $A < B$, replace $B$ with $B-A$.\n\nHow many times will you repeat it until $A=B$? It is guaranteed that a finite repetition makes $A=B$."},{"iden":"constraints","content":"*   $1 \\le A,B \\le 10^{18}$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$A$ $B$"},{"iden":"sample input 1","content":"3 8"},{"iden":"sample output 1","content":"4\n\nInitially, $A=3$ and $B=8$. You repeat the operation as follows:\n\n*   $A<B$, so replace $B$ with $B-A=5$, making $A=3$ and $B=5$.\n*   $A<B$, so replace $B$ with $B-A=2$, making $A=3$ and $B=2$.\n*   $A>B$, so replace $A$ with $A-B=1$, making $A=1$ and $B=2$.\n*   $A<B$, so replace $B$ with $B-A=1$, making $A=1$ and $B=1$.\n\nThus, you repeat it four times."},{"iden":"sample input 2","content":"1234567890 1234567890"},{"iden":"sample output 2","content":"0\n\nNote that the input may not fit into a 32-bit integer type."},{"iden":"sample input 3","content":"1597 987"},{"iden":"sample output 3","content":"15"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}