#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
long long a[N];
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  cout << 1 << " ";
  n--;
  for (long long i = 1; i <= n; i++) {
    long long x = i, y = n - i;
    if (x % 3 != 0 && y % 3 != 0) return cout << x << " " << y, 0;
  }
  return 0;
}
