#include using namespace std; int main() { long long N; cin >> N; bool B = false; long long limit = 1e18; string Ans; auto DFS = [&](auto DFS, int C, long long m) -> void { if (B || C > 10000 || m > limit) return; if (m == 1) { B = true; cout << Ans.size() << endl << Ans << endl; return; } if (m % 2 == 0) { Ans += '/'; DFS(DFS, C + 1, m / 2); } else { Ans += '+'; DFS(DFS, C + 1, m * 3 + 1); Ans.pop_back(); Ans += '-'; DFS(DFS, C + 1, m * 3 - 1); } Ans.pop_back(); }; DFS(DFS, 0, N); }