#include <bits/stdc++.h>
using namespace std;
long long oo[100005], xx[100005];
int main() {
  long long a, b, val, mx;
  long long i, j, k, l, m, x;
  cin >> a >> b;
  if (!b) {
    cout << a * a << endl;
    for (i = 0; i < a; i++) cout << 'o';
  } else if (!a) {
    cout << -b * b << endl;
    for (i = 0; i < b; i++) cout << 'x';
  } else if (b == 1) {
    cout << a * a - 1 << endl;
    for (i = 0; i < a; i++) cout << 'o';
    cout << 'x';
  } else {
    i = 0;
    for (l = 2; l <= b; l++) {
      k = l - 1;
      if (k > a) break;
      val = k - 1 + (a - k + 1) * (a - k + 1);
      m = b % l, x = b / l;
      val -= x * x * (l - m) + (x + 1) * (x + 1) * m;
      if (!i || mx < val) {
        mx = val;
        i = l;
      }
    }
    cout << mx << endl;
    m = b % i, x = b / i;
    for (j = 0; j < i - m; j++) xx[j] = x;
    for (; j < i; j++) xx[j] = x + 1;
    for (j = 0; j < i - 2; j++) oo[j] = 1;
    oo[i - 2] = a - i + 2;
    for (j = 0; j < i - 1; j++) {
      for (k = 0; k < xx[j]; k++) cout << 'x';
      for (k = 0; k < oo[j]; k++) cout << 'o';
    }
    for (k = 0; k < xx[i - 1]; k++) cout << 'x';
  }
  cout << endl;
}
