#include <bits/stdc++.h>
using namespace std;
const long long INF = 1ll << 60;
long long n, m, a[100010], b[100010], A[100010], B[100010], ans, x, y;
void prin(int t, int c) {
  if (t == 0) {
    for (int i = 1; i <= c; ++i) putchar('o');
  } else {
    for (int i = 1; i <= c; ++i) putchar('x');
  }
}
int main() {
  cin >> n >> m;
  if (n == 0) {
    cout << (-m) * m << endl;
    prin(1, m);
    return 0;
  }
  if (m == 0) {
    cout << n * n << endl;
    prin(0, n);
    return 0;
  }
  for (int i = 1; i <= n; ++i) a[i] = (i - 1) + (n - i + 1) * (n - i + 1);
  b[0] = b[m + 1] = INF;
  for (int i = 1; i <= m; ++i) {
    long long p = m / i, q = m % i;
    b[i] = p * p * (i - q) + (p + 1) * (p + 1) * q;
  }
  ans = -INF;
  for (int i = 1; i <= n; ++i) {
    for (int j = i - 1; j <= i + 1; ++j) {
      if (j < 1 || j > m) continue;
      if (a[i] - b[j] > ans) ans = a[i] - b[j], x = i, y = j;
    }
  }
  cout << ans << endl;
  for (int i = 1; i <= x - 1; ++i) A[i] = 1;
  A[x] = n - x + 1;
  long long p = m / y, q = m % y;
  int t = 0;
  for (int i = 1; i <= y - q; ++i) B[++t] = p;
  for (int i = y - q + 1; i <= y; ++i) B[++t] = p + 1;
  if (x == y - 1)
    t = 1;
  else
    t = 0;
  int P = 0, Q = 0;
  while (P < x || Q < y) {
    if (t == 1)
      prin(t, B[++Q]);
    else
      prin(t, A[++P]);
    t ^= 1;
  }
  return 0;
}
