#include #include "bits/stdc++.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) using namespace std; typedef pair P; vector coins; int main() { int n = 0; cin >> n; int k = 1; int goukei = 1; while (goukei <= n) { coins.push_back(goukei); k++; goukei = k * (k + 1) / 2; } /* for (int i = 0; i < coins.size(); i++) { cout << coins[i] << endl; } cout << endl; */ int a = 100000000; for (int i = coins.size() - 1; i >= 0; i--) { int sum = n; /* int ans = 0; int summ=0; return 0; ans = sum / coins[i]; sum = sum % coins[i]; summ= sum; */ if (sum == coins[i]) { cout<<1<= 0; j--) { if (coins[j] == sum - coins[j]) { cout<<2<