#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
long long n, m;
int main() {
  scanf("%I64d %I64d", &n, &m);
  long long ret = -10000000000000000LL;
  if (n == 0) {
    ret = -m * m;
    cout << ret << endl;
    for (int i = (1); i <= (m); ++i) printf("x");
    cout << endl;
  } else if (m == 0) {
    ret = n * n;
    cout << ret << endl;
    for (int i = (1); i <= (n); ++i) printf("o");
    cout << endl;
  } else if (m == 1) {
    ret = n * n - 1;
    cout << ret << endl;
    for (int i = (1); i <= (n); ++i) printf("o");
    printf("x");
    puts("");
  } else {
    int bj = 0;
    for (int i = (1); i <= (min(m - 1, n)); ++i) {
      long long now = (i - 1) + (n - i + 1) * (n - i + 1);
      long long val = m / (i + 1);
      long long rest = m % (i + 1);
      now -= rest * (val + 1) * (val + 1);
      now -= (i + 1 - rest) * val * val;
      if (ret < now) {
        ret = now;
        bj = i;
      }
    }
    cout << ret << endl;
    long long val = m / (bj + 1);
    long long rest = m % (bj + 1);
    for (int i = (1); i <= (bj); ++i) {
      if (rest) {
        for (int j = (1); j <= (val + 1); ++j) printf("x");
        rest--;
      } else {
        for (int j = (1); j <= (val); ++j) printf("x");
      }
      if (i != bj)
        printf("o");
      else {
        for (int j = (1); j <= (n - bj + 1); ++j) printf("o");
      }
    }
    for (int i = (1); i <= (val); ++i) printf("x");
    cout << endl;
  }
  return 0;
}
