#include <bits/stdc++.h>
using std::cin;
using std::cout;
int main() {
  int* x;
  int n = 0, iult = 1;
  int* temp;
  x = new int[6];
  temp = new int[6];
  x[0] = 0;
  x[1] = 1;
  cin >> n;
  for (int i = 2; x[iult] < n; i++) {
    x[i] = x[i - 2] + x[i - 1];
    iult++;
    if (i % 5 == 0 && x[iult] < n) {
      temp = x;
      x = new int[6];
      for (int j = 0; j < 4; j++) {
        x[j] = temp[j + 2];
      }
      iult = 3;
      i = 3;
    }
  }
  int a = 0, b = 0, c = 0;
  if (n > 0) {
    a = x[iult - 1];
    b = x[iult - 3];
    c = x[iult - 4];
    if (n < 3 && n > 0) {
      b = x[1 - (2 % n)];
      c = x[0];
    }
  }
  cout << c << " " << b << " " << a;
  return 0;
}
