#include <bits/stdc++.h>
using namespace std;
long long fib[50];
int main() {
  long long n, ans;
  fib[0] = 0;
  fib[1] = 1;
  bool flag = true;
  for (int i = 2; i < 50; i++) fib[i] = fib[i - 1] + fib[i - 2];
  scanf("%lld", &n);
  for (int i = 0; i < 50 && flag; i++)
    for (int j = 0; j < 50 && flag; j++)
      for (int k = 0; k < 50 && flag; k++) {
        if (fib[i] + fib[j] + fib[k] == n) {
          printf("%lld %lld %lld\n", fib[i], fib[j], fib[k]);
          flag = false;
          break;
        }
      }
  return 0;
}
