#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
long long ln(long long x) {
  x = abs(x);
  long long ds = 0;
  while (x) {
    x /= 10;
    ds++;
  }
  return ds;
}
long long _gcd(long long a, long long b) { return a ? _gcd(b % a, a) : b; }
long long sdn(long long ch) {
  long long cch = ch, sum = 0;
  while (cch != 0) {
    sum += cch % 10;
    cch /= 10;
  }
  return sum;
}
long long fd(long long n) {
  long long k;
  do {
    k = n;
    n /= 10;
  } while (n);
  return k;
}
long long ilya(string &str) {
  map<char, long long> x;
  for (int i = 0; i < str.size(); i++) {
    x[str[i]]++;
  }
  long long mx = -1;
  for (int i = 0; i < 256; i++) {
    mx = max(mx, x[i]);
  }
  return mx;
}
long long _lcm(long long a, long long b) { return a * b / _gcd(a, b); }
long long dbp(long long x1, long long y1, long long x2, long long y2) {
  return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}
long long S1(long long a, long long b) {
  bool serega = 1;
  while (b >= 0) {
    b = b - a;
    serega = !serega;
  }
  return serega + 1;
}
long long S2(long long a, long long b) { return (a + 1) * (b + 1) / 2; }
long long fact(long long x) {
  long long f = 1;
  for (long long i = 2; i <= x; i++) {
    f = f * i;
  }
  return f;
}
void slsrt(vector<long long> &x) {
  for (int i = 0; i < (int)x.size() - 1; ++i) {
    int ii = i;
    for (int j = i + 1; j < x.size(); ++j) {
      if (x[j] < x[ii]) ii = j;
    }
    swap(x[i], x[ii]);
  }
}
void blsrt(vector<long long> &x) {
  int n = x.size();
  bool srg = true;
  while (srg) {
    srg = false;
    for (int j = 0; j < n - 1; ++j) {
      if (x[j] > x[j + 1]) {
        swap(x[j], x[j + 1]);
        srg = true;
      }
    }
    --n;
  }
}
void insrt(vector<int> &x) {
  for (int i = 1; i < x.size(); ++i) {
    int tmp = x[i];
    int j = i - 1;
    while (j >= 0 && x[j] > tmp) {
      x[j + 1] = x[j];
      --j;
    }
    x[j + 1] = tmp;
  }
}
long long isq(long long a) {
  long long b = sqrt(a);
  return b * b == a;
}
inline void kupaga() {
  long long a, b, sum = 0, cvr = 0;
  cin >> a >> b;
  if (a < b) {
    swap(a, b);
  }
  while (b > 0) {
    cvr = a / b;
    a -= b * cvr;
    sum += cvr;
    if (b > a) {
      swap(a, b);
    }
  }
  cout << sum << endl;
}
int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  kupaga();
  return 0;
}

### Prompt

Your task is to create a cpp solution to the following problem:

One day Vasya was sitting on a not so interesting Maths lesson and making an origami from a rectangular a mm  ×  b mm sheet of paper (a > b). Usually the first step in making an origami is making a square piece of paper from the rectangular sheet by folding the sheet along the bisector of the right angle, and cutting the excess part.

<image>

After making a paper ship from the square piece, Vasya looked on the remaining (a - b) mm  ×  b mm strip of paper. He got the idea to use this strip of paper in the same way to make an origami, and then use the remainder (if it exists) and so on. At the moment when he is left with a square piece of paper, he will make the last ship from it and stop.

Can you determine how many ships Vasya will make during the lesson?

Input

The first line of the input contains two integers a, b (1 ≤ b < a ≤ 1012) — the sizes of the original sheet of paper.

Output

Print a single integer — the number of ships that Vasya will make.

Examples

Input

2 1


Output

2


Input

10 7


Output

6


Input

1000000000000 1


Output

1000000000000

Note

Pictures to the first and second sample test.

<image>

### Response

```cpp
#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
long long ln(long long x) {
  x = abs(x);
  long long ds = 0;
  while (x) {
    x /= 10;
    ds++;
  }
  return ds;
}
long long _gcd(long long a, long long b) { return a ? _gcd(b % a, a) : b; }
long long sdn(long long ch) {
  long long cch = ch, sum = 0;
  while (cch != 0) {
    sum += cch % 10;
    cch /= 10;
  }
  return sum;
}
long long fd(long long n) {
  long long k;
  do {
    k = n;
    n /= 10;
  } while (n);
  return k;
}
long long ilya(string &str) {
  map<char, long long> x;
  for (int i = 0; i < str.size(); i++) {
    x[str[i]]++;
  }
  long long mx = -1;
  for (int i = 0; i < 256; i++) {
    mx = max(mx, x[i]);
  }
  return mx;
}
long long _lcm(long long a, long long b) { return a * b / _gcd(a, b); }
long long dbp(long long x1, long long y1, long long x2, long long y2) {
  return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}
long long S1(long long a, long long b) {
  bool serega = 1;
  while (b >= 0) {
    b = b - a;
    serega = !serega;
  }
  return serega + 1;
}
long long S2(long long a, long long b) { return (a + 1) * (b + 1) / 2; }
long long fact(long long x) {
  long long f = 1;
  for (long long i = 2; i <= x; i++) {
    f = f * i;
  }
  return f;
}
void slsrt(vector<long long> &x) {
  for (int i = 0; i < (int)x.size() - 1; ++i) {
    int ii = i;
    for (int j = i + 1; j < x.size(); ++j) {
      if (x[j] < x[ii]) ii = j;
    }
    swap(x[i], x[ii]);
  }
}
void blsrt(vector<long long> &x) {
  int n = x.size();
  bool srg = true;
  while (srg) {
    srg = false;
    for (int j = 0; j < n - 1; ++j) {
      if (x[j] > x[j + 1]) {
        swap(x[j], x[j + 1]);
        srg = true;
      }
    }
    --n;
  }
}
void insrt(vector<int> &x) {
  for (int i = 1; i < x.size(); ++i) {
    int tmp = x[i];
    int j = i - 1;
    while (j >= 0 && x[j] > tmp) {
      x[j + 1] = x[j];
      --j;
    }
    x[j + 1] = tmp;
  }
}
long long isq(long long a) {
  long long b = sqrt(a);
  return b * b == a;
}
inline void kupaga() {
  long long a, b, sum = 0, cvr = 0;
  cin >> a >> b;
  if (a < b) {
    swap(a, b);
  }
  while (b > 0) {
    cvr = a / b;
    a -= b * cvr;
    sum += cvr;
    if (b > a) {
      swap(a, b);
    }
  }
  cout << sum << endl;
}
int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  kupaga();
  return 0;
}

```