#include <bits/stdc++.h>
using namespace std;

int main() {
    freopen("division.in", "r", stdin);
    freopen("division.out", "w", stdout);

    int n;
    cin >> n;
    int n3 = n / 3;
    int delta = 4;
    int minv = max(n3 - delta, 1);
    int maxv = min(n3 + delta, n);

    long long best = (long long) n * n;
    int ba, bb, bc = 0;
    for (long long a = minv; a <= maxv; a++) {
        for (long long b = a + 1; b <= maxv; b++) {
            for (long long c = b + 1; c <= maxv; c++) {
                if (a + b + c == n && a * a + b * b + c * c < best) {
                    best = a * a + b * b + c * c;
                    ba = a;
                    bb = b;
                    bc = c;
                }
            }
        }
    }
    cout << ba << " " << bb << " " << bc << endl;
}
