#include <bits/stdc++.h>
using namespace std;
long long n, m, each, add, ans = -1e15, l, r, tmp, flag;
int main() {
  cin >> n >> m;
  if (n == 0) {
    cout << -m * m << endl;
    for (long long i = (1); i <= (m); i++) putchar('x');
  } else if (m <= 1) {
    cout << n * n - (m > 0) << endl;
    if (m) putchar('x');
    for (long long i = (1); i <= (n); i++) putchar('o');
  } else {
    for (long long i = (2); i <= (m); i++) {
      each = m / i;
      add = m - each * i;
      tmp = n - (i - 2);
      if (tmp <= 0) break;
      tmp = tmp * tmp + (i - 2) - add * (each + 1) * (each + 1) -
            (i - add) * each * each;
      if (ans < tmp) ans = tmp, flag = i;
    }
    cout << ans << endl;
    each = m / flag;
    add = m - each * flag;
    for (long long i = (1); i <= (flag); i++) {
      for (int j = (each + (i <= add)); j >= (1); j--) putchar('x');
      if (i < flag - 1)
        putchar('o');
      else if (i < flag)
        for (int j = (n - (flag - 2)); j >= (1); j--) putchar('o');
    }
  }
  return 0;
}
