#include <bits/stdc++.h>   using namespace std;   void enable_comma() {}   string tostring(char c) {     string s =   ;     s += c;     return s;   }   string tostring(string s) { return     + s +    ; }   string tostring(const char *c) { return tostring((string)c); }   string tostring(long long x) {     if (x < 0) return  -  + tostring(-x);     if (x > 9)       return tostring(x / 10) + tostring(char( 0  + x % 10));     else       return tostring(char( 0  + x));   }   string tostring(int x) { return tostring((long long)x); }   string tostring(unsigned long long x) {     if (x > 9)       return tostring((long long)(x / 10)) + tostring(char( 0  + x % 10));     else       return tostring(char( 0  + x));   }   string tostring(unsigned x) { return tostring((long long)x); }   string tostring(double x) {     static char res[114];     sprintf(res,  %lf , x);     string s = tostring(res);     return s.substr(1, (int)s.size() - 2);   }   string tostring(long double x) { return tostring((double)x); }   template <class A, class B>   string tostring(pair<A, B> p) {     return  (  + tostring(p.first) +  ,  + tostring(p.second) +  ) ;   }   template <class T>   string tostring(T v) {     string res =   ;     for (auto p : v) res += (res.size() ?  ,  :  { ) + tostring(p);     return res.size() ? res +  }  :  {} ;   }   template <class A>   string tostring(A *a, int L, int R) {     return tostring(vector<A>(a + L, a + R + 1));   };   template <class A>   string tostring(A a, int L, int R) {     return tostring(a.data(), L, R);   }   string tostrings() { return   ; }   template <typename Head, typename... Tail>   string tostrings(Head H, Tail... T) {     return tostring(H) +     + tostrings(T...);   }   long long read() {     long long x = 0, f = 0;     char ch = getchar();     while (!isdigit(ch)) f = ch ==  - , ch = getchar();     while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();     return f ? -x : x;   }   template <class T>   void ckmax(T &x, const T y) {     if (x < y) x = y;   }   template <class T>   void ckmin(T &x, const T y) {     if (x > y) x = y;   }   const int N = 100005;   struct op {     int tp;     long long a, b;   };   vector<op> res;   int a[60];   set<long long> S;   long long gao(int tp, long long a, long long b) {     (!(S.count(a) && S.count(b)) ? cout <<  Assertion failed!  << endl                                         <<  function:   << __FUNCTION__ << endl                                         <<  line:   << 149 << endl                                         <<  expression:                                           <<  S.count(a) && S.count(b)  << endl,      exit(3), 0 : 1);     res.push_back({tp, a, b});     long long res = tp ? a ^ b : a + b;     S.insert(res);     (!(0 <= res && res <= 5000000000000000000LL)      ? cout <<  Assertion failed!  << endl             <<  function:   << __FUNCTION__ << endl             <<  line:   << 153 << endl             <<  expression:               <<  0 <= res && res <= 5000000000000000000LL  << endl,      exit(3), 0 : 1);     return res;   }   int Log(long long x) {     int ans = 0;     while (x > 1) {       ans++;       x >>= 1;     }     return ans;   }   int main() {     long long x = read();     srand(time(NULL));     S.clear();     res.clear();     S.insert(x);     while (x > 1) {       vector<long long> v = {x};       while (1) {         int p = (int)v.size() - 1;         while (p > 0 && rand() % 5 != 0) p--;         long long a = v.back(), b = gao(0, a, a), c = gao(0, v[p], b);         if (Log(b) != Log(c)) {           v.push_back(c);           continue;         } else {           long long t = b ^ c;           for (int i = ((int)v.size() - 1); i >= (0); i--) {             if (Log(t) == Log(v[i] * 2)) t ^= v[i] * 2;             if (Log(t) == Log(v[i])) t ^= v[i];           }           if (~t & 1) {             v.push_back(c);             continue;           }           t = gao(1, b, c);           for (int i = ((int)v.size() - 1); i >= (0); i--) {             if (Log(t) == Log(v[i] * 2)) t = gao(1, t, v[i] * 2);             if (Log(t) == Log(v[i])) t = gao(1, t, v[i]);           }           (!(Log(t) < Log(x)) ? cout <<  Assertion failed!  << endl                                      <<  function:   << __FUNCTION__ << endl                                      <<  line:   << 198 << endl                                      <<  expression:                                        <<  Log(t) < Log(x)  << endl,            exit(3), 0 : 1);           x = t;           break;         }       }     }     printf( %d n , (int)res.size());     for (auto v : res) printf( %I64d %c %I64d n , v.a,  +^ [v.tp], v.b);     return 0;   }