#include <bits/stdc++.h>
using namespace std;
long long a, b;
long long sq(long long x) { return x * x; }
void solve() {
  long long ans = -sq(a + b);
  long long o, x;
  long long mi = min(a, b);
  for (long long i = 1; i <= mi; ++i) {
    long long tmpa = (i - 1) + sq(a - (i - 1));
    for (long long j = i - 1; j <= i + 1; ++j) {
      if (j > 0 && j <= b) {
        long long tmpb = sq(b / j) * (j - b % j) + sq(b / j + 1) * (b % j);
        long long tmps = tmpa - tmpb;
        if (tmps > ans) {
          ans = tmps;
          o = i;
          x = j;
        }
      }
    }
  }
  printf("%lld\n", ans);
  if (o >= x) {
    for (long long i = 1; i <= o; ++i) {
      long long len1, len2;
      if (i == 1)
        len1 = a - o + 1;
      else
        len1 = 1;
      if (i <= b % x)
        len2 = b / x + 1;
      else
        len2 = b / x;
      for (long long j = 0; j < len1; ++j) printf("o");
      if (i <= x)
        for (long long j = 0; j < len2; ++j) printf("x");
    }
    printf("\n");
  } else {
    for (long long i = 1; i <= x; ++i) {
      long long len1, len2;
      if (i == 1)
        len1 = a - o + 1;
      else
        len1 = 1;
      if (i <= b % x)
        len2 = b / x + 1;
      else
        len2 = b / x;
      for (long long j = 0; j < len2; ++j) printf("x");
      if (i <= o)
        for (long long j = 0; j < len1; ++j) printf("o");
    }
    printf("\n");
  }
}
int main() {
  scanf("%lld%lld", &a, &b);
  if (a == 0) {
    printf("%lld\n", -sq(b));
    for (long long i = 0; i < b; ++i) printf("x");
    printf("\n");
  } else if (b == 0) {
    printf("%lld\n", sq(a));
    for (long long i = 0; i < a; ++i) printf("o");
    printf("\n");
  } else
    solve();
  return 0;
}
