#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio( false );
  cin.tie( 0 );
  int w;
  cin >> w;
  string ans = "";
  while(w != 1)
  {
    switch( w % 3 )
    {
      case 0:
        ans = "0" + ans;
        break;
      case 1:       
        ans = "+" + ans;
        --w;
        break;
      case 2:
        ans = "-" + ans;
        ++w;
        break;
    }
    w /= 3;
  }
  ans = "+" + ans;
  cout << ans << "\n";
}