#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int64_t n; cin >> n; string s; while (n != 1) { if (n % 2 == 0) { n /= 2; s += '/'; } else if ((3 * n - 1) % 4 == 0) { n = 3 * n - 1; s += '-'; } else { n = 3 * n + 1; s += '+'; } } cout << s.size() << '\n' << s; }