#include <bits/stdc++.h>
using namespace std;
const int maxn = 100050;
long long xMin[maxn], oMax[maxn];
int main() {
  long long a, b;
  cin >> a >> b;
  for (int i = 1; i <= b; ++i) {
    xMin[i] =
        (b % i) * (b / i + 1) * (b / i + 1) + (i - b % i) * (b / i) * (b / i);
  }
  for (int i = 1; i <= a; ++i) {
    oMax[i] = (a - i + 1) * (a - i + 1) + i - 1;
  }
  long long ans = a * a - b * b;
  int cnt = 1;
  for (int i = 2; i <= b && i - 1 <= a; ++i) {
    if (ans < oMax[i - 1] - xMin[i]) {
      ans = oMax[i - 1] - xMin[i];
      cnt = i;
    }
  }
  cout << ans << endl;
  if (cnt == 1) {
    for (int i = 1; i <= a; ++i) putchar('o');
    for (int i = 1; i <= b; ++i) putchar('x');
  } else {
    for (int i = 0; i < cnt - 1; ++i) {
      for (int j = 0; j < b / cnt; ++j) putchar('x');
      if (i < b % cnt) putchar('x');
      if (i == 0) {
        for (int j = 0; j < a - cnt + 2; ++j) {
          putchar('o');
        }
      } else {
        putchar('o');
      }
    }
    for (int j = 0; j < b / cnt; ++j) putchar('x');
  }
}
