#include #include #include #include #include #include using namespace std; using ll = long long; using P = pair; class Error1{}; string ans = ""; void dfs(ll x){ if(x == 1){ cout << ans.size() << endl; cout << ans << endl; throw Error1{}; } if(x%2 == 0){ ans += "/"; dfs(x/2); ans.pop_back(); }else{ if(x*3+1 <= 1000000000000000000){ ans += "+"; dfs(x*3+1); } ans.pop_back(); if(x*3-1 <= 1000000000000000000){ ans += "-"; dfs(x*3-1); } ans.pop_back(); } } int main(){ ll n; cin >> n; try{ dfs(n); }catch(Error1 &e){ }; return 0; }