#include <iostream>
using namespace std;
using llong = long long;

llong w;
llong pt[15];
char ans[15];

bool dfs(int i, llong d) {
	if (i == 15 && d == w) return true;
	else if (i == 15) return false;
	
	bool f = false;
	
	if (dfs(i + 1, d + pt[i])) ans[i] = '+', f = true;
	
	if (dfs(i + 1, d)) ans[i] = '0', f = true;
	
	if (dfs(i + 1, d - pt[i])) ans[i] = '-', f = true;
	
	return f;
}

int main() {
	cin >> w;
	
	pt[0] = 1;
	for (int i = 1; i < 15; i++) {
		pt[i] = pt[i - 1] * 3;
	}
	
	dfs(0, 0);
	
	bool f = false;
	for (int i = 14; i >= 0; i--) {
		if (ans[i] != '0') f = true;
		
		if (f) cout << ans[i];
	}
	cout << endl;
	
	return 0;
}
