#include <iostream>
using namespace std;

int main()
{
	int N, n[15], i;
	for (i = 0; i < 15; i++)
		n[i] = 0;
	cin >> N;
	for (i = 0; N;i++) {
		n[i] = (N + 1) % 3 - 1;
		N = (N - n[i]) / 3;
	}
	for (i--; i >= 0;i--) {
		if (n[i] == 1)
			cout << '+';
		else if (n[i] == 0)
			cout << '0';
		else
			cout << '-';
	}
	cout << endl;
	return 0;
}