#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d;
  while (cin >> a >> b) {
    long long ans = -9999999999999;
    long long ans1 = 0;
    long long ans2 = 0;
    long long flag, flag1, flag2, flag3;
    if (a == 0) {
      cout << -b * b << endl;
      for (int i = 1; i <= b; i++) cout << 'x';
      cout << endl;
    } else if (b == 0) {
      cout << a * a << endl;
      for (int i = 1; i <= a; i++) cout << 'o';
      cout << endl;
    } else if (a == 1) {
      cout << 1 - (b / 2) * (b / 2) - ((b + 1) / 2) * ((b + 1) / 2) << endl;
      for (int i = 1; i <= b / 2; i++) cout << 'x';
      cout << 'o';
      for (int i = b / 2 + 1; i <= b; i++) cout << 'x';
      cout << endl;
    } else if (b == 1) {
      cout << a * a - 1 << endl;
      for (int i = 1; i <= a; i++) cout << 'o';
      cout << 'x' << endl;
    } else {
      for (int i = 2; i <= a + 1 && i <= b; i++) {
        c = b / i;
        d = b % i;
        ans1 = -d * (c + 1) * (c + 1) - (i - d) * c * c;
        ans2 = i - 2 + (a - i + 2) * (a - i + 2);
        if (ans1 + ans2 > ans) {
          ans = ans1 + ans2;
          flag = i;
          flag1 = c;
          flag2 = d;
        }
      }
      if (ans <= a * a - b * b) {
        cout << a * a - b * b << endl;
        for (int i = 1; i < a; i++) cout << 'o';
        for (int i = 1; i < b; i++) cout << 'x';
        cout << endl;
      } else {
        cout << ans << endl;
        for (int j = 1; j <= flag2; j++) {
          for (int k = 1; k <= flag1 + 1; k++) {
            cout << 'x';
          }
          if (j == 1) {
            for (int k = 1; k <= a - flag + 2; k++) cout << 'o';
          } else
            cout << 'o';
        }
        for (int j = flag2 + 1; j <= flag; j++) {
          for (int k = 1; k <= flag1; k++) {
            cout << 'x';
          }
          if (flag2 == 0 && j == 1) {
            for (int k = 1; k <= a - flag + 2; k++) cout << 'o';
          } else if (j != flag)
            cout << 'o';
        }
        cout << endl;
      }
    }
  }
  return 0;
}
