#include <bits/stdc++.h>
template <class T = int>
T gcd(T a, T b) {
  if (b == 0) {
    return (a < 0 ? -a : a);
  }
  return gcd(b, a % b);
}
class Random {
  std::mt19937 rng;

 public:
  Random() : rng(std::chrono::steady_clock::now().time_since_epoch().count()) {}
  void nextBytes(unsigned char *data, int amount) {
    std::uniform_int_distribution<short> uid(0, 255);
    for (int i = 0; i < amount; i++) {
      data[i] = uid(rng);
    }
  }
  template <class T = int>
  T nextInt(T min, T max) {
    std::uniform_int_distribution<T> uid(min, max);
    return uid(rng);
  }
  template <class T = int>
  T nextInt(T max) {
    return nextInt(0, max);
  }
  template <class T = int>
  T nextInt() {
    return nextInt(std::numeric_limits<T>::min(),
                   std::numeric_limits<T>::max());
  }
  template <class T = double>
  T nextFloat() {
    std::uniform_real_distribution<T> urd(0.0, std::nexttoward((T)1.0, 0.0));
    return urd(rng);
  }
  template <class RandomAccessIterator>
  void shuffle(RandomAccessIterator begin, RandomAccessIterator end) {
    std::shuffle(begin, end, rng);
  }
};
struct Op {
  long long a, b;
  int op;
};
Random rng;
int n;
std::vector<Op> ans;
std::set<long long> seen;
void writeAns(long long a, long long b, int op) {
  if (a == 0 || b == 0) return;
  if (op == 0) {
    if (!seen.insert(a + b).second) return;
  }
  if (op == 1) {
    if (!seen.insert(a ^ b).second) return;
  }
  ans.push_back({a, b, op});
}
std::pair<long long, long long> findPair(long long v1, long long v2) {
  long long cv1 = v1;
  long long cv2 = v2;
  long long c1 = 1;
  long long c2 = 1;
  while (cv1 != cv2 + 1) {
    if (cv1 <= cv2) {
      long long add = (cv2 - cv1 + v1 - 1) / v1;
      cv1 += v1 * add;
      c1 += add;
    } else {
      cv2 += v2;
      c2++;
    }
  }
  return {c1, c2};
}
long long findMul(long long v) {
  for (int i = 0; i < 100000; i++) {
    long long mul1 = v;
    long long mul2 = rng.nextInt<int>(1, v);
    long long v1 = v * mul1;
    long long v2 = v * mul2;
    long long x = v1 ^ v2;
    if (gcd(v, x) == 1) return mul2;
  }
  assert(false);
}
void writeInit(long long n, long long end) {
  for (long long i = n; i <= end; i *= 2) {
    writeAns(i, i, 0);
  }
}
void writeMul(long long init, long long mul) {
  long long initMul = mul;
  long long add = init;
  long long v = 0;
  while (mul) {
    if (mul & 1) {
      writeAns(v, add, 0);
      v += add;
    }
    add *= 2;
    mul /= 2;
  }
  assert(v == init * initMul);
}
int main() {
  scanf("%d", &n);
  writeInit(n, (long long)n * n * n);
  long long mul = findMul(n);
  writeMul(n, mul);
  writeMul(n, n);
  writeAns((long long)n * n, n * mul, 1);
  long long v1 = (long long)n * n;
  long long v2 = n * mul;
  long long v3 = v1 ^ v2;
  auto p = findPair(n, v3);
  writeInit(v3, v3 * p.second);
  writeMul(n, p.first);
  writeMul(v3, p.second);
  long long v4 = n * p.first;
  long long v5 = v3 * p.second;
  if (v4 % 2 == 0) {
    writeAns(v4, n, 0);
    writeAns(v5, n, 0);
    v4 += n;
    v5 += n;
  }
  writeAns(v4, v5, 1);
  printf("%d\n", ans.size());
  for (auto &a : ans) {
    printf("%I64d %c %I64d\n", a.a, a.op == 0 ? '+' : '^', a.b);
  }
  return 0;
}
