#include <iostream> using namespace std; int n(int a,int b){ if(a==b){ return 1; } if(a>b){ swap(a,b); } return n(a,b-a)+1; } int main(){ int a,b; cin>>a>>b; cout<<n(a,b); }