#include using namespace std; int main() { long long n; cin >> n; string ans; while (n != 1) { if (n % 2 == 0) { n /= 2; ans += '/'; } else { long long a = n * 3 + 1; long long b = n * 3 - 1; int ac = 0, bc = 0; while (a % 2 == 0) { a /= 2; ac++; } while (b % 2 == 0) { b /= 2; bc++; } n = (ac > bc ? n * 3 + 1 : n * 3 - 1); ans += (ac > bc ? '+' : '-'); } } cout << ans.size() << endl; cout << ans << endl; }