#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-8;
const int MOD = 1000000007;
const int N = 2000000 + 10;
const int M = 2000000 + 10;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int tmp = n / 3;
  if (n % 3 == 0) {
    if (tmp % 3)
      cout << tmp << ' ' << tmp << ' ' << tmp << '\n';
    else
      cout << tmp - 2 << ' ' << tmp + 1 << ' ' << tmp + 1 << '\n';
  } else if (n % 3 == 1) {
    if (tmp % 3 == 1)
      cout << tmp + 1 << ' ' << tmp << ' ' << tmp << '\n';
    else if (tmp % 3 == 2)
      cout << tmp + 2 << ' ' << tmp << ' ' << tmp - 1 << '\n';
    else
      cout << tmp + 4 << ' ' << tmp - 2 << ' ' << tmp - 1 << '\n';
  } else {
    if (tmp % 3 == 1)
      cout << tmp + 1 << ' ' << tmp + 1 << ' ' << tmp << '\n';
    else if (tmp % 3 == 2)
      cout << tmp + 2 << ' ' << tmp << ' ' << tmp << '\n';
    else
      cout << tmp + 2 << ' ' << tmp + 1 << ' ' << tmp - 1 << '\n';
  }
  return 0;
}
