#include using namespace std; int main() { cin.tie(0); cout.tie(0); long long N; cin >> N; string ans = ""; while(N > 1) { if(N % 2 == 0) { N /= 2; ans += '/'; } else { long long A = 3 * N + 1; long long B = 3 * N - 1; while(A % 2 == 0 && B % 2 == 0) { A /= 2; B /= 2; } if(A % 2 == 0) { ans += '+'; N = 3 * N + 1; } else { ans += '-'; N = 3 * N - 1; } } } cout << (int) ans.length() << '\n'; cout << ans << '\n'; return 0; }