#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long res = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    res = (res << 3) + (res << 1) + ch - '0';
    ch = getchar();
  }
  return res * f;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 | '0');
}
long long Ans, p, q, res, r, ans;
long long n, m;
signed main() {
  n = read(), m = read();
  if (!n) {
    printf("%lld\n", -1ll * m * m);
    for (long long i = 1; i <= m; i++) putchar('x');
    exit(0);
  }
  if (!m || m == 1) {
    printf("%lld\n", 1ll * n * n - m);
    for (long long i = 1; i <= n; i++) putchar('o');
    if (m) putchar('x');
    exit(0);
  }
  Ans = -1e15;
  r = min(n + 1, m);
  for (long long i = 2; i <= r; i++) {
    p = m / i;
    q = m % i;
    ans = 1ll * (n - i + 2) * (n - i + 2) + i - 2 -
          1ll * q * (p + 1) * (p + 1) - 1ll * (i - q) * p * p;
    if (ans > Ans) Ans = ans, res = i;
  }
  printf("%I64d\n", Ans);
  p = m / res;
  q = m % res;
  r = res - q;
  for (long long i = 1; i <= p; i++) putchar('x');
  r--;
  for (long long i = 1; i < n - res + 2; i++) putchar('o');
  for (long long i = 1; i <= r; i++) {
    putchar('o');
    for (long long j = 1; j <= p; j++) putchar('x');
  }
  for (long long i = 1; i <= q; i++) {
    putchar('o');
    for (long long j = 1; j <= p + 1; j++) putchar('x');
  }
}
