#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e3 + 4;
long long int f[1000009];
set<long long int> s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, i = 3, k;
  cin >> n;
  f[0] = 0, f[1] = 1, f[2] = 1;
  s.insert(1), s.insert(0);
  while (f[i - 1] < (n)) {
    f[i] = f[i - 1] + f[i - 2];
    s.insert(f[i]);
    i++;
  }
  for (int j = 0; j < i; j++) {
    for (int m = 0; m < i; m++) {
      long long int d = f[j] + f[m];
      if (s.count(n - d)) {
        cout << f[m] << " " << f[j] << " " << (n - d);
        return 0;
      }
      d = f[i - j - 1] + f[m];
      if (s.count(n - d)) {
        cout << f[m] << " " << f[i - j - 1] << " " << (n - d);
        return 0;
      }
      d = f[i - j - 1] + f[i - m - 1];
      if (s.count(n - d)) {
        cout << f[i - m - 1] << " " << f[i - j - 1] << " " << (n - d);
        return 0;
      }
    }
  }
  cout << "I'm too stupid to solve this problem";
  return 0;
}
