#include <bits/stdc++.h>
using namespace std;
vector<long long> gen_fibs(int n) {
  vector<long long> fibs = {0, 1};
  long long i = fibs[0];
  long long j = fibs[1];
  while (j < n) {
    long long tmp = i + j;
    fibs.push_back(tmp);
    i = j;
    j = tmp;
  }
  return fibs;
}
int main() {
  int n;
  cin >> n;
  vector<long long> fibs = gen_fibs(n);
  vector<long long> answer;
  int c = n;
  while (answer.size() < 3) {
    for (int i = fibs.size() - 1; i >= 0; i--) {
      if (c >= fibs[i]) {
        c -= fibs[i];
        answer.push_back(fibs[i]);
        break;
      }
    }
  }
  if (answer.size() < 3) {
    cout << "I'm too stupid to solve this problem\n";
    return 0;
  }
  for (auto a : answer) {
    cout << a << " ";
  }
  cout << "\n";
  return 0;
}
