#include <bits/stdc++.h>
using namespace std;
inline long long sqr(long long x) { return x * x; }
void fsolve(int a, int b) {
  long long ans = sqr(a) - sqr(b);
  int ans_bg = 1;
  for (int bg = 2; bg <= min(a + 1, b); ++bg) {
    long long sa = sqr(a - (bg - 2)) + (bg - 2);
    long long sb = sqr(b / bg) * (bg - b % bg) + sqr(b / bg + 1) * (b % bg);
    long long s = sa - sb;
    if (s > ans) {
      ans = s;
      ans_bg = bg;
    }
  }
  if (ans_bg <= 1) {
    string s;
    for (int i = 0; i < a; ++i) s += 'o';
    for (int i = 0; i < b; ++i) s += 'x';
    cout << ans << "\n" << s;
    return;
  }
  vector<int> va(ans_bg - 1, 1);
  va[0] = a - (ans_bg - 2);
  vector<int> vb;
  for (int i = 0; i < ans_bg - b % ans_bg; ++i) vb.push_back(b / ans_bg);
  for (int i = 0; i < b % ans_bg; ++i) vb.push_back(b / ans_bg + 1);
  string s;
  for (int j = 0; j < vb.back(); ++j) s += 'x';
  for (int i = 0; i < ans_bg - 1; ++i) {
    for (int j = 0; j < va[i]; ++j) s += 'o';
    for (int j = 0; j < vb[i]; ++j) s += 'x';
  }
  cout << ans << "\n" << s;
}
int main() {
  int a, b;
  cin >> a >> b;
  fsolve(a, b);
  return 0;
}
