#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1111;
const int INF = 0x7f7f7f7f;
int cases;
long long cal(long long t) { return t * t; }
void printx(long long len) {
  for (long long i = 0; i < len; i++) {
    putchar('x');
  }
}
void printo(long long len) {
  for (long long i = 0; i < len; i++) {
    putchar('o');
  }
}
int main() {
  long long o, x;
  cin >> o >> x;
  long long n = min(o, x);
  if (o == 0) {
    printf("%lld\n", -cal(x));
    printx(x);
    putchar('\n');
    return 0;
  } else if (x <= 1) {
    printf("%lld\n", cal(o) - cal(x));
    printo(o);
    printx(x);
    putchar('\n');
    return 0;
  }
  long long ans = -cal(o + x);
  long long ans_w, ans_l;
  for (int w = 1; w <= n; w++) {
    for (int l = w - 1; l <= w + 1; l++) {
      if (1 <= l && l <= x) {
        long long positive = cal(o - (w - 1)) + (w - 1);
        long long negative =
            cal(x / l + 1) * (x % l) + cal(x / l) * (l - x % l);
        if (ans < positive - negative) {
          ans = positive - negative;
          ans_w = w;
          ans_l = l;
        }
      }
    }
  }
  printf("%lld\n", ans);
  if (ans_w >= ans_l) {
    for (long long i = 0; i < ans_w; i++) {
      int wl = (i > 0) ? 1 : o - (ans_w - 1);
      printx(wl);
      int ll = (i < x % ans_l) ? (x / ans_l + 1) : (x / ans_l);
      if (i < ans_l) {
        printo(ll);
      }
    }
  } else {
    for (long long i = 0; i < ans_l; i++) {
      int ll = (i < x % ans_l) ? (x / ans_l + 1) : (x / ans_l);
      printx(ll);
      int wl = (i > 0) ? 1 : o - (ans_w - 1);
      if (i < ans_w) printo(wl);
    }
  }
  putchar('\n');
}
