#include<iostream> using namespace std; int main(){ int a,b,v=0; cin>>a>>b; while(a!=b){ if(a>b){ a-=b; } else{ b-=a; } v++; } cout<<v+1; return 0; }