#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  if (n % 3 == 0) {
    if ((n / 3) % 3 == 0) {
      cout << n / 3 + 2 << " " << n / 3 - 1 << " " << n / 3 - 1;
    } else
      cout << n / 3 << " " << n / 3 << " " << n / 3;
  } else {
    if (n - 3 * (n / 3) == 1) {
      if ((n / 3) % 3 == 0) {
        cout << n / 3 + 2 << " " << n / 3 - 2 << " " << n / 3 + 1;
      } else if ((n / 3 + 1) % 3)
        cout << n / 3 << " " << n / 3 << " " << n / 3 + 1;
      else
        cout << n / 3 << " " << n / 3 + 2 << " " << n / 3 - 1;
    } else {
      if ((n / 3) % 3 == 0) {
        cout << n / 3 + 2 << " " << n / 3 - 2 << " " << n / 3 + 2;
      } else if ((n / 3 + 2) % 3)
        cout << n / 3 << " " << n / 3 << " " << n / 3 + 2;
      else
        cout << n / 3 << " " << n / 3 + 1 << " " << n / 3 + 1;
    }
  }
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int test = 1;
  while (test--) solve();
  return 0;
}
