#include using namespace std; typedef long long ll; int main() { int m,n; cin>>m>>n; int ans=0; while (m!=n) { if (m>n) m-=n; else if (m