#include <bits/stdc++.h>
using namespace std;
long long a, b, ans, tans, apos, p, q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> a >> b;
  if (b == 0) {
    cout << a * a << endl;
    for (int i = 0; i < a; i++) cout << "o";
    cout << endl;
    return 0;
  }
  if (a == 0) {
    cout << -b * b << endl;
    for (int i = 0; i < b; i++) cout << "x";
    cout << endl;
    return 0;
  }
  ans = -1e18;
  swap(a, b);
  for (int blocks = 1; blocks <= b; blocks++) {
    p = a / (blocks + 1);
    q = a % (blocks + 1);
    tans = -(p + 1) * (p + 1) * q - p * p * (blocks + 1 - q);
    tans += (b - blocks + 1) * (b - blocks + 1) + blocks - 1;
    if (tans > ans) {
      ans = tans;
      apos = blocks;
    }
  }
  cout << ans << endl;
  long blocks = apos;
  p = a / (blocks + 1);
  q = a % (blocks + 1);
  for (int i = 0; i < blocks; i++) {
    for (int j = 0; j < p; j++) cout << "x";
    if (i < q) cout << "x";
    if (i == 0)
      for (int j = 0; j < b - blocks + 1; j++) cout << "o";
    else
      cout << "o";
  }
  for (int j = 0; j < p; j++) cout << "x";
  cout << endl;
  cin.get();
  cin.get();
  return 0;
}
