#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int num1 = n / 3;
  long long int num2 = n - (2 * num1);
  if (num1 % 3 != 0 && num2 % 3 != 0)
    cout << num1 << " " << num1 << " " << num2;
  else if (num1 - 1 > 0 && (num1 - 1) % 3 != 0 && (num2 + 2) % 3 != 0)
    cout << num1 - 1 << " " << num1 - 1 << " " << num2 + 2;
  else if (num2 - 2 > 0 && (num1 + 1) % 3 != 0 && (num2 - 2) % 3 != 0)
    cout << num1 + 1 << " " << num1 + 1 << " " << num2 - 2;
  return 0;
}
