#include <bits/stdc++.h>
using namespace std;
int A, B, ind, basic, extra, cnt;
long long Ans;
void computeArrangement(int i, int &basic, int &extra, int &cnt) {
  extra = B % (i + 1);
  basic = (i + 1) - extra;
  cnt = B / (i + 1);
}
void PrintX(int &basic, int &extra, int cnt) {
  if (basic) {
    basic--;
  } else {
    if (!extra) return;
    extra--;
    cnt++;
  }
  for (int i = 1; i <= cnt; i++) cout << "x";
}
int main() {
  cin >> A >> B;
  Ans = -1LL * B * B;
  ind = 0;
  for (int i = 1; i <= A; i++) {
    long long newAns = 1LL * (i - 1) + 1LL * (A - i + 1) * (A - i + 1);
    computeArrangement(i, basic, extra, cnt);
    newAns -= 1LL * basic * cnt * cnt;
    newAns -= 1LL * extra * (cnt + 1) * (cnt + 1);
    if (newAns > Ans) {
      Ans = newAns;
      ind = i;
    }
  }
  cout << Ans << "\n";
  computeArrangement(ind, basic, extra, cnt);
  PrintX(basic, extra, cnt);
  for (int i = 1; i < ind; i++) {
    A--;
    cout << "o";
    PrintX(basic, extra, cnt);
  }
  for (int i = 1; i <= A; i++) cout << "o";
  PrintX(basic, extra, cnt);
}
