#include using namespace std; using ll = long long; string v; set st; const ll inf = 1e18; void dfs(ll from){ if (from == 1){ cout << v.size() << endl; cout << v << endl; exit(0); } st.insert(from); if (from % 2 == 0){ v.push_back('/'); dfs(from/2); v.pop_back(); st.erase(from); } else{ if (from <= (inf-1)/3 && !st.count(from*3+1)){ v.push_back('+'); dfs(from*3+1); v.pop_back(); st.erase(from); } if (from <= (inf+1)/3 && !st.count(from*3-1)){ v.push_back('-'); dfs(from*3-1); v.pop_back(); st.erase(from); } } v.pop_back(); } int main(){ ll N; cin >> N; dfs(N); return 0; }