#include <bits/stdc++.h>
using namespace std;
template <class T>
string toString(T n) {
  ostringstream ost;
  ost << n;
  ost.flush();
  return ost.str();
}
int toInt(string s) {
  int r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
long long a, b;
long long gao(long long kuai) {
  long long ret = 0;
  long long chang = b / kuai + 1;
  long long num = b - kuai * (b / kuai);
  ret = num * chang * chang + (kuai - num) * (chang - 1) * (chang - 1);
  return ret;
}
void out(char ch, long long num) {
  for (long long i = 0; i < num; i++) printf("%c", ch);
}
void output(long long kuai) {
  long long chang = b / kuai + 1;
  long long num = b - kuai * (b / kuai);
  long long tot = kuai - 2;
  for (long long i = 0; i < num; i++) {
    out('x', chang);
    if (tot > 0) {
      putchar('o');
      tot--;
    } else
      out('o', a - kuai + 2);
  }
  for (long long i = 0; i < kuai - num - 1; i++) {
    out('x', chang - 1);
    if (tot > 0) {
      putchar('o');
      tot--;
    } else
      out('o', a - kuai + 2);
  }
  out('x', chang - 1);
  printf("\n");
}
int main() {
  cin >> a >> b;
  if (a == 0) {
    cout << -b * b << endl;
    for (int i = 0; i < b; i++) cout << "x";
    cout << endl;
    return 0;
  }
  long long ans = -99999999999999999LL;
  long long tmp = 0;
  for (long long i = 1; i <= a; i++) {
    long long sum = 0;
    sum += (a + 1 - i) * (a + 1 - i) + (i - 1);
    sum -= gao(i + 1);
    if (sum > ans) {
      ans = sum;
      tmp = i;
    }
  }
  printf("%I64d\n", ans);
  output(tmp + 1);
  return 0;
}
