#include <bits/stdc++.h>
using namespace std;
long long fibo[100], t;
void fill() {
  fibo[0] = fibo[1] = 1LL;
  for (int i = 2; i < 100; i++) {
    fibo[i] = fibo[i - 2] + fibo[i - 1];
    t++;
    if (fibo[i] > 1e9 + 1) break;
  }
}
long long N;
long long arr[3];
int main() {
  fill();
  cin >> N;
  if (N == 3)
    cout << 1 << " " << 1 << ' ' << 1 << endl;
  else {
    int a = lower_bound(fibo, fibo + 43, N) - fibo;
    arr[2] = fibo[a - 1];
    N -= fibo[a - 1];
    a = lower_bound(fibo, fibo + 43, N) - fibo;
    arr[1] = fibo[a - 1];
    N -= fibo[a - 1];
    arr[0] = N;
    sort(arr, arr + 3);
    cout << arr[0] << " " << arr[1] << ' ' << arr[2] << endl;
  }
  return 0;
}
