#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int b = n / 3;
  int c = n % 3;
  if (c == 0) {
    if (b % 3 != 0) {
      cout << b << " " << b << " " << b << endl;
      return 0;
    } else {
      cout << b - 1 << " " << b - 1 << " " << b + 2 << endl;
      return 0;
    }
  }
  if (c == 1) {
    if (b % 3 != 0) {
      if ((b + 1) % 3 != 0) {
        cout << b << " " << b << " " << b + 1 << endl;
        return 0;
      } else {
        cout << b - 1 << " " << b << " " << b + 2 << endl;
        return 0;
      }
    } else {
      cout << b - 2 << " " << b - 1 << " " << b + 4 << endl;
      return 0;
    }
  }
  if (c == 2) {
    if (b % 3 != 0) {
      if ((b + 2) % 3 != 0) {
        cout << b << " " << b << " " << b + 2 << endl;
        return 0;
      } else {
        cout << b << " " << b + 1 << " " << b + 1 << endl;
        return 0;
      }
    } else {
      cout << b - 1 << " " << b - 1 << " " << b + 4 << endl;
      return 0;
    }
  }
}
