#include <bits/stdc++.h>
using namespace std;
long long ans, a, b, i, j;
long long min(long long a, long long b) { return (a < b) ? a : b; }
long long max(long long a, long long b) { return (a > b) ? a : b; }
int main() {
  scanf("%I64d%I64d", &a, &b);
  if (a * b == 0 || b == 1) {
    ans = a * a - b * b;
    printf("%I64d\n", ans);
    for (i = 1; i <= a; ++i) printf("o");
    for (i = 1; i <= b; ++i) printf("x");
  } else {
    j = min(a, b - 1);
    ans = -2500000000000;
    long long ians, k, ii;
    for (i = 1; i <= j; ++i) {
      ians = 0;
      ians += (a - i + 1) * (a - i + 1);
      ians += i - 1;
      ++i;
      k = b / i;
      ians -= k * k * (i - (b % i));
      ians -= (k + 1) * (k + 1) * (b % i);
      --i;
      if (ians >= ans) {
        ans = ians;
        ii = i;
      }
    }
    printf("%I64d\n", ans);
    for (i = 1; i <= b / (ii + 1); ++i) printf("x");
    b -= b / (ii + 1);
    for (ii = ii; ii > 0; --ii) {
      if (ii == 1) {
        for (i = 1; i <= a; ++i) printf("o");
      } else {
        printf("o");
        --a;
      }
      for (i = b / ii; i > 0; --i) printf("x");
      b -= b / ii;
    }
  }
  return 0;
}
