#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int mid = n / 3, yu = n % 3;
    if (yu == 0) {
      if (mid % 3 == 0)
        printf("%d %d %d\n", mid - 1, mid - 1, mid + 2);
      else
        printf("%d %d %d\n", mid, mid, mid);
    } else if (yu == 1) {
      if (mid % 3 == 0)
        printf("%d %d %d\n", mid - 1, mid + 1, mid + 1);
      else if (mid % 3 == 1)
        printf("%d %d %d\n", mid, mid, mid + 1);
      else if (mid % 3 == 2)
        printf("%d %d %d\n", mid - 1, mid, mid + 2);
    } else if (yu == 2) {
      if (mid % 3 == 0)
        printf("%d %d %d\n", mid - 1, mid + 1, mid + 2);
      else if (mid % 3 == 1)
        printf("%d %d %d\n", mid, mid + 1, mid + 1);
      else if (mid % 3 == 2)
        printf("%d %d %d\n", mid, mid, mid + 2);
    }
  }
  return 0;
}
