a, b = map(int,input().split()) cnt = 1 while(a>b): a, b = a-b,b cnt += 1 print(cnt)