#include <bits/stdc++.h>
using namespace std;
long long sqr(long long a) { return a * a; }
int main() {
  int a, b;
  cin >> a >> b;
  if (a == 0) {
    cout << -sqr(b) << endl;
    for (int i = 0; i < b; ++i) cout << 'x';
    return 0;
  }
  if (b == 0) {
    cout << sqr(a) << endl;
    for (int i = 0; i < a; ++i) cout << 'o';
    return 0;
  }
  int amt = min(a + 1, b);
  int best_i = 0;
  long long best_val = -sqr((long long)1e5 - 1);
  for (int i = 1; i <= amt; ++i) {
    long long val = -(b % i) * sqr(b / i + 1) - (i - b % i) * sqr(b / i);
    if (i <= 2) {
      val += sqr(a);
    } else {
      val += sqr(a - (i - 2)) + (i - 2LL);
    }
    if (val > best_val) {
      best_val = val;
      best_i = i;
    }
  }
  cout << best_val << endl;
  if (best_i <= 2) {
    for (int i = 0; i < b / best_i; ++i) {
      cout << 'x';
    }
    for (int i = 0; i < a; ++i) {
      cout << 'o';
    }
    for (int i = 0; i < b - b / best_i; ++i) {
      cout << 'x';
    }
  } else {
    amt = b / best_i;
    if (b % best_i > 0) ++amt;
    for (int i = 0; i < amt; ++i) cout << 'x';
    for (int i = 0; i < a - (best_i - 2); ++i) cout << 'o';
    amt = b / best_i;
    if (b % best_i > 1) ++amt;
    for (int i = 0; i < amt; ++i) cout << 'x';
    for (int i = 3; i <= best_i; ++i) {
      cout << 'o';
      amt = b / best_i;
      if (b % best_i > i - 1) ++amt;
      for (int j = 0; j < amt; ++j) cout << 'x';
    }
  }
  return 0;
}
