#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace atcoder; typedef long long ll; typedef long double ld; typedef pair pll; typedef pair pid; typedef pair pls; typedef vector vb; typedef vector> vvb; typedef vector vi; typedef vector> vvi; typedef vector>> vvvi; typedef vector>>> vvvvi; typedef vector vl; typedef vector> vvl; typedef vector>> vvvl; typedef vector>>> vvvvl; typedef vector vd; typedef vector> vvd; typedef vector vs; #define rep(i,n) for(auto i=0; i=0; --i) #define repdm(i,e,n) for(auto i=n-1; i>=e; --i) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template * = nullptr> constexpr istream& operator>>(istream& is, mint& x) noexcept {long long v = 0; std::cin >> v; x = v; return is;} template * = nullptr> constexpr ostream& operator<<(ostream& os, const mint& x) noexcept {os << x.val(); return os;} inline void _n() { std::cout << std::endl; } template inline void _(const T a) { std::cout << a; } template inline void _l(const T a) { _(a); _n(); } template inline void _s(const T a) { _(a); _(' '); } template inline void _v(const std::vector v) { for(auto a : v) _(a); } template inline void _vl(const std::vector v) { for(auto a : v) _l(a); } template inline void _vs(const std::vector v) { for(auto a : v) _s(a); _n(); } template inline void _vvl(const std::vector> v) { for(auto a : v) { _v(a); _n(); } } template inline void _vvs(const std::vector> v) { for(auto a : v) { _vs(a); } } inline void ynl(const bool b) {_l(b ? "Yes" : "No");} inline void ynu(const bool b) {_l(b ? "YES" : "NO");} const int INF = 1 << 30; const long long INF_LL = 1LL << 62; const long long MOD1 = 1000000007; const long long MOD9 = 998244353; using mint1 = modint1000000007; using mint9 = modint998244353; //* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *// void input() { } void solve() { ll N; cin >> N; bool fg1 = 1; vl A(3); repd(i, 30) { rep(j, 3) { A[j] *= 2; } int Ni = N >> i & 1; if(Ni) { if(fg1) { A[1]++; A[2]++; fg1 = 0; } else { A[0]++; A[1]++; } } } bool fg2 = 0; rep(i, 3) if(A[i] == 0) fg2 = 1; if(fg2) rep(i, 3) A[i] = -1; _vs(A); } //* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *// int main() { std::ifstream in("input.txt"); std::cin.rdbuf(in.rdbuf()); std::cin.tie(0); ios::sync_with_stdio(false); input(); solve(); return 0; }