import javax.swing.event.ListDataEvent;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class J implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());

        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new _Solution(), "", 128 * (1L << 20)).start();
        new J().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    long[] beat(int count, int groups) {
        int lowSize = count / groups;
        int l = 0;
        int r = groups;
        while (l <= r) {
            int mid = (l + r) >> 1;
            long res = (long) mid * lowSize + (long) (groups - mid) * (lowSize + 1);
            if (res == count) return new long[]{mid, groups - mid};
            if (res > count) {
                l = mid + 1;
            } else {
                r = mid - 1;
            }
        }
        throw new RuntimeException();
    }

    void solve() throws IOException {
        int a = readInt();
        int b = readInt();
        if (b == 0) {
            out.println(1L * a * a);
            while (a-- > 0) {
                out.print('o');
            }
            return;
        }
        if (a == 0) {
            out.println(-1L * b * b);
            while (b-- > 0) {
                out.print('x');
            }
            return;
        }

        long bestResult = Long.MIN_VALUE;
        int bestGroupCount = -1;

        for (int maxGroupLen = 1; maxGroupLen <= a; maxGroupLen++) {
            int groupCount = 1 + a - maxGroupLen;
            long[] beatB = beat(b, groupCount + 1);
            long lowB = b / (groupCount + 1);
            long result = (long) maxGroupLen * maxGroupLen + (a - maxGroupLen) - add(beatB, lowB);
            if (result > bestResult) {
                bestResult = result;
                bestGroupCount = maxGroupLen;
            }
        }
        out.println(bestResult);
        boolean first = true;
        int groups = 1 + a - bestGroupCount;
        for (int i = 0; i < groups; i++) {
            int nowX = b / (groups + 1 - i);
            b -= nowX;
            int os = first ? bestGroupCount : 1;
            first = false;
            a -= os;
            while (nowX-- > 0) {
                out.print('x');
            }
            while (os-- > 0) {
                out.print('o');
            }
        }
        while (b-- > 0) {
            out.print('x');
        }
    }

    long add(long[] beat, long low) {
        return beat[0] * low * low + beat[1] * (low + 1) * (low + 1);
    }
}


import javax.swing.event.ListDataEvent;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class J implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());

        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new _Solution(), "", 128 * (1L << 20)).start();
        new J().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    long[] beat(int count, int groups) {
        int lowSize = count / groups;
        int l = 0;
        int r = groups;
        while (l <= r) {
            int mid = (l + r) >> 1;
            long res = (long) mid * lowSize + (long) (groups - mid) * (lowSize + 1);
            if (res == count) return new long[]{mid, groups - mid};
            if (res > count) {
                l = mid + 1;
            } else {
                r = mid - 1;
            }
        }
        throw new RuntimeException();
    }

    void solve() throws IOException {
        int a = readInt();
        int b = readInt();
        if (b == 0) {
            out.println(1L * a * a);
            while (a-- > 0) {
                out.print('o');
            }
            return;
        }
        if (a == 0) {
            out.println(-1L * b * b);
            while (b-- > 0) {
                out.print('x');
            }
            return;
        }

        long bestResult = Long.MIN_VALUE;
        int bestGroupCount = -1;

        for (int maxGroupLen = 1; maxGroupLen <= a; maxGroupLen++) {
            int groupCount = 1 + a - maxGroupLen;
            long[] beatB = beat(b, groupCount + 1);
            long lowB = b / (groupCount + 1);
            long result = (long) maxGroupLen * maxGroupLen + (a - maxGroupLen) - add(beatB, lowB);
            if (result > bestResult) {
                bestResult = result;
                bestGroupCount = maxGroupLen;
            }
        }
        out.println(bestResult);
        boolean first = true;
        int groups = 1 + a - bestGroupCount;
        for (int i = 0; i < groups; i++) {
            int nowX = b / (groups + 1 - i);
            b -= nowX;
            int os = first ? bestGroupCount : 1;
            a -= os;
            while (nowX-- > 0) {
                out.print('x');
            }
            while (os-- > 0) {
                out.print('o');
            }
        }
        while (b-- > 0) {
            out.print('x');
        }
    }

    long add(long[] beat, long low) {
        return beat[0] * low * low + beat[1] * (low + 1) * (low + 1);
    }
}


import javax.swing.event.ListDataEvent;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class J implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());

        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new _Solution(), "", 128 * (1L << 20)).start();
        new J().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    long[] beat(int count, int groups) {
        int lowSize = count / groups;
        int l = 0;
        int r = groups;
        while (l <= r) {
            int mid = (l + r) >> 1;
            long res = (long) mid * lowSize + (long) (groups - mid) * (lowSize + 1);
            if (res == count) return new long[]{mid, groups - mid};
            if (res > count) {
                l = mid + 1;
            } else {
                r = mid - 1;
            }
        }
        throw new RuntimeException();
    }

    void solve() throws IOException {
        int a = readInt();
        int b = readInt();
        if (b == 0) {
            out.println(1L * a * a);
            while (a --> 0) {
                out.print('o');
            }
            return;
        }
        if (a == 0) {
            out.println(-1L * b * b);
            while (b --> 0) {
                out.print('x');
            }
            return;
        }

        long bestResult = Long.MIN_VALUE;
        int bestGroupCount = -1;

        for (int groupCount = 1; groupCount <= a; groupCount++) {
            long[] beatA = beat(a, groupCount);
            long[] beatB = beat(b, groupCount + 1);
            long lowA = a / groupCount;
            long lowB = b / (groupCount + 1);
            long result = add(beatA, lowA) - add(beatB, lowB);
            if (result > bestResult) {
                bestResult = result;
                bestGroupCount = groupCount;
            }
        }
        out.println(bestResult);
        for (int i = 0; i < bestGroupCount; i++) {
            int nowX = b / (bestGroupCount + 1 - i);
            int nowO = a / (bestGroupCount - i);
            b -= nowX;
            a -= nowO;
            while (nowX --> 0) {
                out.print('x');
            }
            while (nowO --> 0) {
                out.print('o');
            }
        }
        while (b --> 0) {
            out.print('x');
        }
    }

    long add(long[] beat, long low) {
        return beat[0] * low * low + beat[1] * (low + 1) * (low + 1);
    }
}


import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.IOException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskC {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int os = in.readInt(); //positive 1
            int xs = in.readInt(); //negative 0
            int[] a = new int[os + xs];
            for(int i = xs; i < a.length; i++) a[i] = 1;
            long here = (long) os * os - (long) xs * xs;
            if(xs > 0) {
                int[] badblocksarr = new int[xs - 1];
                for(int i = 0; i < badblocksarr.length; i++) badblocksarr[i] = i + 2;
//            AKArrays.shuffle(badblocksarr);
                for(int badblocks : badblocksarr) { //randomize order of the numbers we are considering
                    int splitters = badblocks - 2;
                    int goodbig = os - splitters;
                    if(goodbig <= 0) continue;
                    int smallbadsize = xs / badblocks;
                    int moar = xs - smallbadsize * badblocks;
                    int largebadblocks = moar;
                    int largebadsize = smallbadsize + 1;
                    int smallbadblocks = badblocks - largebadblocks;
                    int goodadd = splitters;
                    long temp = (long) goodadd - (long) smallbadblocks * smallbadsize * smallbadsize -
                            (long) largebadblocks * largebadsize * largebadsize;
                    temp += (long) goodbig * goodbig;
                    if(temp > here) {
                        here = temp;
                        a = gen(smallbadblocks, smallbadsize, largebadblocks, largebadsize, os, a.length);
                    }
                }
            }
            out.printLine(here);
            for(int val : a) out.print(val == 1 ? 'o' : 'x');
        }

        private int[] gen(int smallbadblocks, int smallbadsize, int largebadblocks, int largebadsize, int good, int arrsize) {
            int[] res = new int[arrsize];
            int index = 0;
            while(largebadblocks + smallbadblocks > 1) {
                int width = largebadblocks > 0 ? largebadsize : smallbadsize;
                for(int i = 0; i < width; i++) res[index++] = 1;
                if(largebadblocks + smallbadblocks > 1) {
                    index++; // add some space
                    good--;
                }
                if(largebadblocks > 0) largebadblocks--;
                else smallbadblocks--;
            }
            for(int i = res.length - 1; i > res.length - 1 - smallbadsize; i--) res[i] = 1;
            for(int i = 0; i < res.length; i++) res[i] ^= 1;
            return res;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(char i) {
            writer.print(i);
        }

        public void close() {
            writer.close();
        }

        public void printLine(long i) {
            writer.println(i);
        }

    }
}


import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.util.Random;
import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.IOException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskC {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int os = in.readInt(); //positive 1
            int xs = in.readInt(); //negative 0
            int[] a = new int[os + xs];
            for(int i = xs; i < a.length; i++) a[i] = 1;
            long here = (long) os * os - (long) xs * xs;
            if(xs > 0) {
                int[] badblocksarr = new int[xs - 1];
                for(int i = 0; i < badblocksarr.length; i++) badblocksarr[i] = i + 2;
                AKArrays.shuffle(badblocksarr);
                for(int badblocks : badblocksarr) { //randomize order of the numbers we are considering
                    int splitters = badblocks - 2;
                    int goodbig = os - splitters;
                    if(goodbig <= 0) continue;
                    int smallbadsize = xs / badblocks;
                    int moar = xs - smallbadsize * badblocks;
                    int largebadblocks = moar;
                    int largebadsize = smallbadsize + 1;
                    int smallbadblocks = badblocks - largebadblocks;
                    int goodadd = splitters;
                    long temp = (long) goodadd - (long) smallbadblocks * smallbadsize * smallbadsize -
                            (long) largebadblocks * largebadsize * largebadsize;
                    temp += (long) goodbig * goodbig;
                    if(temp > here) {
                        here = temp;
                        a = gen(smallbadblocks, smallbadsize, largebadblocks, largebadsize, os, a.length);
                    }
                }
            }
            out.printLine(here);
            for(int val : a) out.print(val == 1 ? 'o' : 'x');
            if(calc(a) != here) throw new RuntimeException(here + " " + calc(a));
        }

        private int[] gen(int smallbadblocks, int smallbadsize, int largebadblocks, int largebadsize, int good, int arrsize) {
            int[] res = new int[arrsize];
            int index = 0;
            while(largebadblocks + smallbadblocks > 1) {
                int width = largebadblocks > 0 ? largebadsize : smallbadsize;
                for(int i = 0; i < width; i++) res[index++] = 1;
                if(largebadblocks + smallbadblocks > 1) {
                    index++; // add some space
                    good--;
                }
                if(largebadblocks > 0) largebadblocks--;
                else smallbadblocks--;
            }
            for(int i = res.length - 1; i > res.length - 1 - smallbadsize; i--) res[i] = 1;
            for(int i = 0; i < res.length; i++) res[i] ^= 1;
            return res;
        }

        private long calc(int[] a) {
            long pos = 0, neg = 0;
            ArrayList<Integer> p = new ArrayList<>(), n = new ArrayList<>();
            for(int i = 0; i < a.length; i++) {
                if(a[i] == 1) {
                    if(i > 0 && a[i - 1] == 1) {
                        p.set(p.size() - 1, p.get(p.size() - 1) + 1);
                    } else {
                        p.add(1);
                    }
                } else {
                    if(i > 0 && a[i - 1] == 0) {
                        n.set(n.size() - 1, n.get(n.size() - 1) + 1);
                    } else {
                        n.add(1);
                    }
                }
            }
            for(long val : p) pos += val * val;
            for(long val : n) neg += val * val;
            return pos - neg;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(char i) {
            writer.print(i);
        }

        public void close() {
            writer.close();
        }

        public void printLine(long i) {
            writer.println(i);
        }

    }

    static class AKArrays {
        public static void shuffle(int[] arr) {
            int n = arr.length;
            Random rnd = new Random();
            for(int i = 0; i < n; ++i) {
                int tmp = arr[i];
                int randomPos = i + rnd.nextInt(n - i);
                arr[i] = arr[randomPos];
                arr[randomPos] = tmp;
            }
        }

    }
}


import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.util.Random;
import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.IOException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskC {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int os = in.readInt(); //positive 1
            int xs = in.readInt(); //negative 0
            int[] a = new int[os + xs];
            for(int i = xs; i < a.length; i++) a[i] = 1;
            long here = (long) os * os - (long) xs * xs;
            if(xs > 0) {
                int[] badblocksarr = new int[xs - 1];
                for(int i = 0; i < badblocksarr.length; i++) badblocksarr[i] = i + 2;
                AKArrays.shuffle(badblocksarr);
                for(int badblocks : badblocksarr) { //randomize order of the numbers we are considering
                    int splitters = badblocks - 2;
                    int goodbig = os - splitters;
                    if(goodbig <= 0) continue;
                    int smallbadsize = xs / badblocks;
                    int moar = xs - smallbadsize * badblocks;
                    int largebadblocks = moar;
                    int largebadsize = smallbadsize + 1;
                    int smallbadblocks = badblocks - largebadblocks;
                    int goodadd = splitters;
                    long temp = (long) goodadd - (long) smallbadblocks * smallbadsize * smallbadsize -
                            (long) largebadblocks * largebadsize * largebadsize;
                    temp += (long) goodbig * goodbig;
                    if(temp > here) {
                        here = temp;
                        a = gen(smallbadblocks, smallbadsize, largebadblocks, largebadsize, os, a.length);
                    }
                }
            }
            out.printLine(here);
            for(int val : a) out.print(val == 1 ? 'o' : 'x');
        }

        private int[] gen(int smallbadblocks, int smallbadsize, int largebadblocks, int largebadsize, int good, int arrsize) {
            int[] res = new int[arrsize];
            int index = 0;
            while(largebadblocks + smallbadblocks > 1) {
                int width = largebadblocks > 0 ? largebadsize : smallbadsize;
                for(int i = 0; i < width; i++) res[index++] = 1;
                if(largebadblocks + smallbadblocks > 1) {
                    index++; // add some space
                    good--;
                }
                if(largebadblocks > 0) largebadblocks--;
                else smallbadblocks--;
            }
            for(int i = res.length - 1; i > res.length - 1 - smallbadsize; i--) res[i] = 1;
            for(int i = 0; i < res.length; i++) res[i] ^= 1;
            return res;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(char i) {
            writer.print(i);
        }

        public void close() {
            writer.close();
        }

        public void printLine(long i) {
            writer.println(i);
        }

    }

    static class AKArrays {
        public static void shuffle(int[] arr) {
            int n = arr.length;
            Random rnd = new Random();
            for(int i = 0; i < n; ++i) {
                int tmp = arr[i];
                int randomPos = i + rnd.nextInt(n - i);
                arr[i] = arr[randomPos];
                arr[randomPos] = tmp;
            }
        }

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class C233 {
	public static void main(String[] args) {
		MyScanner scan = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);

		long a = scan.nextLong(), b = scan.nextLong();
		long t = Math.abs(a-b);
		long sol;
		if(b>a){
			sol = Math.max(a*a-b*b, -(t)*(t));
		}
		else
			sol = Math.max(a*a-b*b, -(t+1)*(t+1));
		out.println(sol);
		StringBuilder s = new StringBuilder("");
		if(sol==a*a-b*b){
			for(int i=0;i<a;i++)s=s.append('o');
			for(int i=0;i<b;i++)s=s.append('x');
		}else if (b>a){
			for(int i=0;i<Math.min(a, b);i++){
				s = s.append("xo");
			}
			for(int i=0;i<t;i++)s = s.append('x');
		}else{
			for(int i=0;i<Math.min(a, b);i++){
				s=s.append("ox");
			}
		}
		out.println(s);
		out.close();
	}
	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next(){
			while(st==null||!st.hasMoreElements()){
				try{st = new StringTokenizer(br.readLine());}
				catch(IOException e){e.printStackTrace();}
			}return st.nextToken();
		}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong(){return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class C233 {
	static long sol = 0;
	public static void main(String[] args) {
		MyScanner scan = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);

		long a = scan.nextLong(), b = scan.nextLong();

		StringBuilder s = new StringBuilder("");
		if(a>=b){sol = a*a-b*b;}
		else{
			s = solve(a,b);
		}

		if(a>=b){
			for(int i=0;i<a;i++)s=s.append('o');
			for(int i=0;i<b;i++)s=s.append('x');
		}
		out.println(sol);
		out.println(s);
		out.close();
	}
	private static StringBuilder solve(long a, long b) {

		if(a==0){
			sol-=b*b;
			StringBuilder s = new StringBuilder("");
			for(int i=0;i<b;i++)s=s.append('x');
			return s;
		}

		long l = b/2, r= (b+1)/2, al = (a-1)/2, ar = a/2;
		sol+=1;
		return solve(al, l).append('o').append(solve(ar,r));
	}
	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next(){
			while(st==null||!st.hasMoreElements()){
				try{st = new StringTokenizer(br.readLine());}
				catch(IOException e){e.printStackTrace();}
			}return st.nextToken();
		}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong(){return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class codeforces {
	static final long oo = (long)1e15;
	static ArrayList<Integer> vals;
	public static void main(String[] args) {
		MyScanner scan = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);

		long a = scan.nextInt(), b = scan.nextInt();

		long sol = -oo;
		long imax = -1, gmax = -1, g2max = 0, type = -1;
		StringBuilder s = new StringBuilder("");
		if(a==0||b==0){
			sol = a*a-b*b;
			for(int i=0;i<a;i++)s=s.append('o');
			for(int j=0;j<b;j++)s=s.append('x');
		}else{
			for(long i=1;i<=a;i++){
				long temp = 0;
				temp+=(a-(i-1))*(a-(i-1));
				if(b/(i+1)>0){
					long g = (b/(i+1))*(i+1);
					long x = (b/(i+1));
					long g2 = (b/(i+1))+b-g;

					temp-=g2*g2+(i)*((b/(i+1))*(b/(i+1)));
					if(temp>sol){
						type = 0;
						sol=temp;
						imax = i;
						gmax = x;
						g2max = g2;
					}
				}else if(b/i >0){
					long g = (b/i)*i;
					long g2 =(b/i)+ b-g;
					long x = (b/i);
					temp-=g2*g2+(i-1)*((b/i)*(b/i));
					if(temp>sol){
						type=1;
						sol=temp;
						imax = i;
						gmax = x;
						g2max = g2;
					}
				}else if (i!=1&&b/(i-1)>0){
					long g = (b/(i-1))*(i-1);
					long x = (b/(i-1));
					long g2 = (b/(i-1))+ b-g;
					temp-=g2*g2+(i-2)*((b/(i-1))*(b/(i-1)));
					if(temp>sol){
						type=2;
						sol=temp;
						imax = i;
						gmax = x;
						g2max = g2;
					}
				}else{
					continue;
				}
			}
			out.println(sol);
			boolean used = false;
			for(int i=0;i<imax;i++){
				if(i!=imax-1||type==0){for(int j=0;j<gmax;j++)if(j!=0||type==0||type==1)s=s.append('x');}
				else{ for(int j=0;j<g2max;j++)s=s.append('x');}
				if(!used)for(int j=0;j<(a-(imax-1));j++)s=s.append('o');
				else s=s.append('o');
			}if(type==0)for(int j=0;j<g2max;j++)s=s.append('x');
		}
		out.println(s);
		out.close();
	}

	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next(){
			while(st==null||!st.hasMoreElements()){
				try{st = new StringTokenizer(br.readLine());}
				catch(IOException e){e.printStackTrace();}
			}return st.nextToken();
		}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong(){return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class codeforces {
	static final long oo = (long)1e15;
	static ArrayList<Integer> vals;
	public static void main(String[] args) {
		MyScanner scan = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);

		long a = scan.nextInt(), b = scan.nextInt();

		long sol = -oo;
		long imax = -1, gmax = -1, g2max = 0, type = -1;
		StringBuilder s = new StringBuilder("");
		if(a==0||b==0){
			sol = a*a-b*b;
			out.println(sol);
			for(int i=0;i<a;i++)s=s.append('o');
			for(int j=0;j<b;j++)s=s.append('x');
		}else{
			for(long i=1;i<=a;i++){
				long temp = 0;
				temp+=(a-(i-1))*(a-(i-1));
				if(b/(i+1)>0){
					long g = (b/(i+1))*(i+1);
					long x = (b/(i+1));
					long g2 = (b/(i+1))+b-g;

					temp-=g2*g2+(i)*((b/(i+1))*(b/(i+1)));
					if(temp>sol){
						type = 0;
						sol=temp;
						imax = i;
						gmax = x;
						g2max = g2;
					}
				}else if(b/i >0){
					long g = (b/i)*i;
					long g2 =(b/i)+ b-g;
					long x = (b/i);
					temp-=g2*g2+(i-1)*((b/i)*(b/i));
					if(temp>sol){
						type=1;
						sol=temp;
						imax = i;
						gmax = x;
						g2max = g2;
					}
				}else if (i!=1&&b/(i-1)>0){
					long g = (b/(i-1))*(i-1);
					long x = (b/(i-1));
					long g2 = (b/(i-1))+ b-g;
					temp-=g2*g2+(i-2)*((b/(i-1))*(b/(i-1)));
					if(temp>sol){
						type=2;
						sol=temp;
						imax = i;
						gmax = x;
						g2max = g2;
					}
				}else{
					continue;
				}
			}
			out.println(sol);
			boolean used = false;
			for(int i=0;i<imax;i++){
				if(i!=imax-1||type==0){for(int j=0;j<gmax;j++)if(j!=0||type==0||type==1)s=s.append('x');}
				else{ for(int j=0;j<g2max;j++)s=s.append('x');}
				if(!used)for(int j=0;j<(a-(imax-1));j++)s=s.append('o');
				else s=s.append('o');
			}if(type==0)for(int j=0;j<g2max;j++)s=s.append('x');
		}
		out.println(s);
		out.close();
	}

	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next(){
			while(st==null||!st.hasMoreElements()){
				try{st = new StringTokenizer(br.readLine());}
				catch(IOException e){e.printStackTrace();}
			}return st.nextToken();
		}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong(){return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class codeforces {
	static final long oo = (long)1e15;
	static ArrayList<Integer> vals;
	public static void main(String[] args) {
		MyScanner scan = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);

		long a = scan.nextInt(), b = scan.nextInt();

		long sol = -oo, P=0, Q=0;
		StringBuilder s = new StringBuilder("");
		if(a==0||b==0){
			sol = a*a-b*b;
			for(int i=0;i<a;i++)s=s.append('o');
			for(int j=0;j<b;j++)s=s.append('x');
		}else{
			for(long p=1;p<=a;p++){
				for(long q = p-1;q<=p+1;q++){
					long temp = (a-(p-1))*(a-(p-1));
					temp+=p-1;
					if(q==0)continue;
					temp-=(b%q)*(b/q + 1)*(b/q + 1);
					temp-=(q-b%q)*(b/q)*(b/q);

					long ta=a,tb=b;
					if(temp>sol){
						sol=temp;
						P=p;Q=q;
					}
				}
			}

			for(int i=0;i<Q;i++){
				if(i<b%Q)for(int j=0;j<b/Q+1;j++)s=s.append('x');
				else for(int j=0;j<b/Q;j++)s=s.append('x');
				if(i!=Q-1||Q==1){
					if(i==0)for(int j=0;j<(a-(P-1));j++)s=s.append('o');
					else s=s.append('o');
				}
			}
		}
		out.println(sol);
		out.println(s);
		out.close();
	}

	private static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next(){
			while(st==null||!st.hasMoreElements()){
				try{st = new StringTokenizer(br.readLine());}
				catch(IOException e){e.printStackTrace();}
			}return st.nextToken();
		}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong(){return Long.parseLong(next());}
		double nextDouble(){return Double.parseDouble(next());}
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main (String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader (inputStream);
		PrintWriter out = new PrintWriter (outputStream);
		TaskC solver = new TaskC ();
		solver.solve (1, in, out);
		out.close ();
	}

	static class TaskC {
		public void solve (int testNumber, InputReader in, PrintWriter out) {
			int a = in.nextInt (), ra = 1, nb = 1;
			int b = in.nextInt (), rb = b;
			long tmp = -b*(long) b, os = 0;
			for (int i = 1; i<=a; i++) {
//koyta a ekshathe rakhbo that's the question because bs are going to be distributed evenly
//if there is going to be i 'a's then a-i+2 places are for 'b's
				os = (i*(long) i+a-i-
						(b%(a-i+2)*(b/(a-i+2)+1)*(long) (b/(a-i+2)+1)+((a-i+2)-(b%(a-i+2)))*(long) (b/(a-i+2))*(b/(a-i+2))));
				if (os>tmp) {
					tmp = os;
					ra = i;
					nb = b%(a-i+2);
					rb = (b/(a-i+2)+1);
				}
			}
			out.println (tmp);
			if (nb>0) {
				for (int i = 0; i<rb; i++) {
					out.print ("x");
				}
				nb--;
			}
			else {
				for (int i = 0; i<rb-1; i++) {
					out.print ("x");
				}
			}
			for (int i = 0; i<ra-1; i++) {
				out.print ("o");
			}
			for (int i = 0; i<a-ra+1; i++) {
				out.print ("o");
				if (nb>0) {
					for (int j = 0; j<rb; j++) {
						out.print ("x");
					}
					nb--;
				}
				else {
					for (int j = 0; j<rb-1; j++) {
						out.print ("x");
					}
				}
			}
		}

	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader (InputStream stream) {
			reader = new BufferedReader (new InputStreamReader (stream), 32768);
			tokenizer = null;
		}

		public String next () {
			while (tokenizer == null || !tokenizer.hasMoreTokens ()) {
				try {
					String str;
					if ((str = reader.readLine ()) != null) tokenizer = new StringTokenizer (str);
					else return null;//to detect eof
				} catch (IOException e) {
					throw new RuntimeException (e);
				}
			}
			return tokenizer.nextToken ();
		}

		public int nextInt () {
			return Integer.parseInt (next ());
		}

	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main (String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader (inputStream);
		PrintWriter out = new PrintWriter (outputStream);
		TaskC solver = new TaskC ();
		solver.solve (1, in, out);
		out.close ();
	}

	static class TaskC {
		public void solve (int testNumber, InputReader in, PrintWriter out) {
			int a = in.nextInt (), ra = 1, nb = 1;
			int b = in.nextInt (), rb = b;
			long tmp = -b*b, os = 0;
			for (int i = 1; i<=a; i++) {
//koyta a ekshathe rakhbo that's the question because bs are going to be distributed evenly
//if there is going to be i 'a's then a-i+2 places are for 'b's
				os = (i*(long) i+a-i-
						(b%(a-i+2)*(b/(a-i+2)+1)*(long) (b/(a-i+2)+1)+((a-i+2)-(b%(a-i+2)))*(long) (b/(a-i+2))*(b/(a-i+2))));
				if (os>tmp) {
					tmp = os;
					ra = i;
					nb = b%(a-i+2);
					rb = (b/(a-i+2)+1);
				}
			}
			out.println (tmp);
			if (nb>0) {
				for (int i = 0; i<rb; i++) {
					out.print ("x");
				}
				nb--;
			}
			else {
				for (int i = 0; i<rb-1; i++) {
					out.print ("x");
				}
			}
			for (int i = 0; i<ra-1; i++) {
				out.print ("o");
			}
			for (int i = 0; i<a-ra+1; i++) {
				out.print ("o");
				if (nb>0) {
					for (int j = 0; j<rb; j++) {
						out.print ("x");
					}
					nb--;
				}
				else {
					for (int j = 0; j<rb-1; j++) {
						out.print ("x");
					}
				}
			}
		}

	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader (InputStream stream) {
			reader = new BufferedReader (new InputStreamReader (stream), 32768);
			tokenizer = null;
		}

		public String next () {
			while (tokenizer == null || !tokenizer.hasMoreTokens ()) {
				try {
					String str;
					if ((str = reader.readLine ()) != null) tokenizer = new StringTokenizer (str);
					else return null;//to detect eof
				} catch (IOException e) {
					throw new RuntimeException (e);
				}
			}
			return tokenizer.nextToken ();
		}

		public int nextInt () {
			return Integer.parseInt (next ());
		}

	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main (String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader (inputStream);
		PrintWriter out = new PrintWriter (outputStream);
		TaskC solver = new TaskC ();
		solver.solve (1, in, out);
		out.close ();
	}

	static class TaskC {
		public void solve (int testNumber, InputReader in, PrintWriter out) {
			int a = in.nextInt (), ra = 1, nb = 1;
			int b = in.nextInt (), rb = b;
			long tmp = -b*b, os = 0;
			for (int i = 1; i<=a; i++) {
//koyta a ekshathe rakhbo that's the question because bs are going to be distributed evenly
//if there is going to be i 'a's then a-i+2 places are for 'b's
				os = (i*(long) i+a-i-(b%(a-i+2)*(b/(a-i+2)+1)*(b/(a-i+2)+1)+((a-i+2)-(b%(a-i+2)))*(b/(a-i+2))*(b/(a-i+2))));
				if (os>tmp) {
					tmp = os;
					ra = i;
					nb = b%(a-i+2);
					rb = (b/(a-i+2)+1);
				}
			}
			out.println (tmp);
			if (nb>0) {
				for (int i = 0; i<rb; i++) {
					out.print ("x");
				}
				nb--;
			}
			else {
				for (int i = 0; i<rb-1; i++) {
					out.print ("x");
				}
			}
			for (int i = 0; i<ra-1; i++) {
				out.print ("o");
			}
			for (int i = 0; i<a-ra+1; i++) {
				out.print ("o");
				if (nb>0) {
					for (int j = 0; j<rb; j++) {
						out.print ("x");
					}
					nb--;
				}
				else {
					for (int j = 0; j<rb-1; j++) {
						out.print ("x");
					}
				}
			}
		}

	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader (InputStream stream) {
			reader = new BufferedReader (new InputStreamReader (stream), 32768);
			tokenizer = null;
		}

		public String next () {
			while (tokenizer == null || !tokenizer.hasMoreTokens ()) {
				try {
					String str;
					if ((str = reader.readLine ()) != null) tokenizer = new StringTokenizer (str);
					else return null;//to detect eof
				} catch (IOException e) {
					throw new RuntimeException (e);
				}
			}
			return tokenizer.nextToken ();
		}

		public int nextInt () {
			return Integer.parseInt (next ());
		}

	}
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 *
 * 28691 28312
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        //PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int a = in.nextInt();
        int b = in.nextInt();

        long result = -pow(b, 2);
        int l = 0;
        int r = 0;
        long h = 0;
        for (int i = 0; i <= a && a > 0; i++) {
            int c = i;
            int d = a - i;
            long div = i + 2;
            long have = b / div;

            long temp = (long) (i + pow(d, 2));
            temp -= (long) ((div - (b % div)) * pow(have, 2));
            temp -= (b % div) * Math.pow(have + 1, 2);

            if (temp > result) {
                result = temp;
                l = c;
                r = d;
                h = have;
            }

        }
        out.println(result);
        // System.out.println(l + " " + r);
        if (l + r > 0) {
            //System.out.println(l + " " + r);
            int div = l + 2;

            int left = div - (b % div);
            if (b % div != 0) {
                for (int i = 0; i < left; i++) {
                    for (int j = 0; j < h; j++) {
                        out.print('x');
                    }
                    out.print('o');
                }
                for (int i = 0; i < (b % div) - 1; i++) {
                    for (int j = 0; j < h + 1; j++) {
                        out.print('x');
                    }
                    out.print('o');
                }
                for (int i = 0; i < r - 1; i++) {
                    out.print('o');
                }
                for (int j = 0; j < h + 1; j++) {
                    out.print('x');
                }
            } else {
                for (int i = 0; i < left - 1; i++) {
                    for (int j = 0; j < h; j++) {
                        out.print('x');
                    }
                    out.print('o');
                }
                for (int i = 0; i < r - 1; i++) {
                    out.print('o');
                }
                for (int j = 0; j < h; j++) {
                    out.print('x');
                }
            }

        } else {
            for (int i = 0; i < b; i++) {
                out.print('x');
            }
        }
        // System.out.println("Finish");

        //System.out.println("Finish");
        out.close();
    }

    public static int cross(Point a, Point b) {
        int val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 *
 * 28691 28312
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        //PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int a = in.nextInt();
        int b = in.nextInt();

        long result = -pow(b, 2);
        int l = 0;
        int r = 0;
        long h = 0;
        for (int i = 0; i < a && a > 0; i++) {
            int c = i;
            int d = a - i;
            long div = i + 2;
            long have = b / div;

            long temp = (long) (i + pow(d, 2));
            temp -= (long) ((div - (b % div)) * pow(have, 2));
            temp -= (b % div) * Math.pow(have + 1, 2);
          //  System.out.println(c + " " + d + " " + temp);
            if (temp > result) {
                result = temp;
                l = c;
                r = d;
                h = have;
            }

        }
        out.println(result);
        // System.out.println(l + " " + r);
        if (l + r > 0) {
            //System.out.println(l + " " + r);
            int div = l + 2;

            int left = div - (b % div);
            if (b % div != 0) {
                for (int i = 0; i < left; i++) {
                    for (int j = 0; j < h; j++) {
                        out.print('x');
                    }
                    out.print('o');
                }
                for (int i = 0; i < (b % div) - 1; i++) {
                    for (int j = 0; j < h + 1; j++) {
                        out.print('x');
                    }
                    out.print('o');
                }
                for (int i = 0; i < r - 1; i++) {
                    out.print('o');
                }
                for (int j = 0; j < h + 1; j++) {
                    out.print('x');
                }
            } else {
                for (int i = 0; i < left - 1; i++) {
                    for (int j = 0; j < h; j++) {
                        out.print('x');
                    }
                    out.print('o');
                }
                for (int i = 0; i < r - 1; i++) {
                    out.print('o');
                }
                for (int j = 0; j < h; j++) {
                    out.print('x');
                }
            }

        } else {
            for (int i = 0; i < b; i++) {
                out.print('x');
            }
        }
        // System.out.println("Finish");

        //System.out.println("Finish");
        out.close();
    }

    public static int cross(Point a, Point b) {
        int val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;
    public static int[][] dp;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int a = in.nextInt();
        int b = in.nextInt();
        long result = 0;
        StringBuilder builder = new StringBuilder();
        if (a <= b) {
            while (a > 0 && b > 0) {
                b--;
                a--;
                builder.append("xo");
            }

            result -= Math.pow(b, 2);
            while (b > 0) {
                builder.append('x');
                b--;
            }
        } else {
            int l = b / 2;
            int r = b - l;
            result -= Math.pow(l, 2);
            result -= Math.pow(r, 2);
            result += Math.pow(a, 2);
            for (int i = 0; i < l; i++) {
                builder.append('x');
            }
            for (int i = 0; i < a; i++) {
                builder.append('o');
            }
            for (int i = 0; i < r; i++) {
                builder.append('x');
            }
        }
        out.println(result);
        out.println(builder.toString());
        out.close();
    }

    public static int cross(Point a, Point b) {
        int val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 *
 28691 28312
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        //PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int a = in.nextInt();
        int b = in.nextInt();

        long result = -(long) Math.pow(b, 2);
        int l = 0;
        int r = 0;
        for (int i = 0; i < a; i++) {
            int c = i;
            int d = a - i;
            long div = i + 2;
            long have = b / div;
            long last = have + b % div;
            long temp = (long) (i + Math.pow(d, 2));
            temp -= (long) ((div - 1) * Math.pow(have, 2));
            temp -= Math.pow(last, 2);
            if (temp > result) {
                result = temp;
                l = c;
                r = d;
            }
        }
        out.println(result);
        if (l + r > 0) {
          //  System.out.println(l + " " + r);
            int div = l + 2;
            int have = b / div;
            int last = have + b % div;

            for (int i = 0; i < l; i++) {
                for (int j = 0; j < have; j++) {
                    out.print('x');
                }
                out.print('o');
            }
            for (int j = 0; j < have; j++) {
                out.print('x');
            }

            for (int i = 0; i < r; i++) {
                out.print('o');
            }
            for (int j = 0; j < last; j++) {
                out.print('x');
            }

        } else {
            for (int i = 0; i < b; i++) {
                out.print('x');
            }
        }
        // System.out.println("Finish");

        //System.out.println("Finish");
        out.close();
    }

    public static int cross(Point a, Point b) {
        int val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;
    public static int[][] dp;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int a = in.nextInt();
        int b = in.nextInt();
        long result = 0;
        StringBuilder builder = new StringBuilder();
        while(a > 0 && b > 0){
            b--;
            a--;
            builder.append("xo");
        }
        if(a > 0){

            result +=Math.pow(a,2);
            while(a > 0){
                builder.append('o');
                a--;
            }
        }else{
            result -= Math.pow(b,2);
            while(b > 0){
                builder.append('x');
                b--;
            }
        }
        out.println(result);
        out.println(builder.toString());
        out.close();
    }

    public static int cross(Point a, Point b) {
        int val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 *
 * 28691 28312
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        //PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int a = in.nextInt();
        int b = in.nextInt();

        long result = -(long) Math.pow(b, 2);
        int l = 0;
        int r = 0;
        long h = 0;
        for (int i = 0; i <= a && a > 0; i++) {
            int c = i;
            int d = a - i;
            long div = i + 2;
            long have = b / div;
            long last = have + (b - (have*div));
            long temp = (long) (i + Math.pow(d, 2));
            temp -= (long) ((div - 1) * Math.pow(have, 2));
            temp -= Math.pow(last, 2);

            if (temp > result) {
                result = temp;
                l = c;
                r = d;
                h = have;
            }
            have += 1;
            last = have + (b - (div * have));
            if (last > 0) {
                temp = (long) (i + Math.pow(d, 2));
                temp -= (long) ((div - 1) * Math.pow(have, 2));
                temp -= Math.pow(last, 2);
                if (temp > result) {
                    result = temp;
                    l = c;
                    r = d;
                    h = have;
                }
            }
        }
        out.println(result);
       // System.out.println(l + " " + r);
        if (l + r > 0) {
            //System.out.println(l + " " + r);
            int div = l + 2;

            long last = h + (b - (div * h));

            for (int i = 0; i < l; i++) {
                for (int j = 0; j < h; j++) {
                    out.print('x');
                }
                out.print('o');
            }
            for (int j = 0; j < h; j++) {
                out.print('x');
            }

            for (int i = 0; i < r; i++) {
                out.print('o');
            }
            for (int j = 0; j < last; j++) {
                out.print('x');
            }

        } else {
            for (int i = 0; i < b; i++) {
                out.print('x');
            }
        }
        // System.out.println("Finish");

        //System.out.println("Finish");
        out.close();
    }

    public static int cross(Point a, Point b) {
        int val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 *
 * 28691 28312
 *
 * @author pttrung
 */
public class C {

    //   public static long x, y, gcd;
    public static int Mod = 1000000007;
    public static PrintWriter out;

    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner();
        out = new PrintWriter(System.out);
        //   System.out.println(Integer.MAX_VALUE);
        //PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        int a = in.nextInt();
        int b = in.nextInt();

        long result = -(long) Math.pow(b, 2);
        int l = 0;
        int r = 0;
        long h = 0;
        for (int i = 0; i <= a; i++) {
            int c = i;
            int d = a - i;
            long div = i + 2;
            long have = b / div;
            long last = have + (b - (have*div));
            long temp = (long) (i + Math.pow(d, 2));
            temp -= (long) ((div - 1) * Math.pow(have, 2));
            temp -= Math.pow(last, 2);
            if (temp > result) {
                result = temp;
                l = c;
                r = d;
                h = have;
            }
            have += 1;
            last = have + (b - (div * have));
            if (last > 0) {
                temp = (long) (i + Math.pow(d, 2));
                temp -= (long) ((div - 1) * Math.pow(have, 2));
                temp -= Math.pow(last, 2);
                if (temp > result) {
                    result = temp;
                    l = c;
                    r = d;
                    h = have;
                }
            }
        }
        out.println(result);
        if (l + r > 0) {
            //  System.out.println(l + " " + r);
            int div = l + 2;

            long last = h + (b - (div * h));

            for (int i = 0; i < l; i++) {
                for (int j = 0; j < h; j++) {
                    out.print('x');
                }
                out.print('o');
            }
            for (int j = 0; j < h; j++) {
                out.print('x');
            }

            for (int i = 0; i < r; i++) {
                out.print('o');
            }
            for (int j = 0; j < last; j++) {
                out.print('x');
            }

        } else {
            for (int i = 0; i < b; i++) {
                out.print('x');
            }
        }
        // System.out.println("Finish");

        //System.out.println("Finish");
        out.close();
    }

    public static int cross(Point a, Point b) {
        int val = a.x * b.y - a.y * b.x;
        return val;
    }

    public static long pow(long a, long b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2);
        if (b % 2 == 0) {
            return val * val;
        } else {
            return val * val * a;
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            } else {
                return y - o.y;
            }
        }
    }
//    public static void extendEuclid(long a, long b) {
//        if (b == 0) {
//            x = 1;
//            y = 0;
//            gcd = a;
//            return;
//        }
//        extendEuclid(b, a % b);
//        long x1 = y;
//        long y1 = x - (a / b) * y;
//        x = x1;
//        y = y1;
//
//    }

    public static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        public void update(int index, int value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public int get(int index) {
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}


print(function(a, b){
	var ans=[];
	var left=Math.floor(b/2);
	var right=Math.ceil(b/2);
	for(var i=0; i<left; i++){
		ans.push('x');
	}
	for(var i=0; i<a; i++){
		ans.push('o');
	}
	for(var i=0; i<right; i++){
		ans.push('x');
	}

	return (a===0 ? b*b : a*a-left*left-right*right)+'\n'+ans.join('');
}.apply(0, readline().split(' ').map(Number)));


print(function(a, b){
	if(b===0){
		var ans=[];
		for(var i=0; i<a; i++){
			ans.push('o');
		}
		return a*a + '\n' + ans.join('');
	}
	var ans=-1e20;
	var t=-1;
	for(var i=1, l=Math.min(a+1, b); i<=l; i++){
		var bx=Math.floor(b/i);
		var bi=b%i;
		var ai=i<=2 ? 0 : i-1;
		var ax=a-ai;
		var x = ax*ax+ai - (bx+1)*(bx+1)*bi - bx*bx*(i-bi);
		if(x>ans){
			ans=x;
			t=i;
		}else{
			break;
		}
	}

	var bx=Math.floor(b/t);
	var bi=b%t;
	var ai=t<=2 ? 0 : t-1;
	var ax=a-ai;
	var aa=[];
	var bb=[];
	var sb=[];
	for(var i=0; i<bi; i++){
		bb.push(repeat(bx+1, 'x'));
	}
	for(var i=0; i<b-bi; i++){
		bb.push(repeat(bx, 'x'));
	}
	for(var i=0; i<ai; i++){
		aa.push('o');
	}
	aa.push(repeat(ax, 'o'));
	aa.push('');

	var ans2=[];
	for(var i=0; i<t; i++){
		ans2.push(bb[i]);
		ans2.push(aa[i]);
	}
	return ans+'\n'+ans2.join('');
}.apply(0, readline().split(' ').map(Number)));
function repeat(n, c){
	var s='';
	while(n--) s+=c;
	return s;
}


print(function(a, b){
	if(a===0){
		var ans=[];
		for(var i=0; i<b; i++){
			ans.push('x');
		}
		return -b*b + '\n' + ans.join('');
	}
	if(b===0){
		var ans=[];
		for(var i=0; i<a; i++){
			ans.push('o');
		}
		return a*a + '\n' + ans.join('');
	}
	var ans=-1e20;
	var t=-1;
	for(var i=0,l=Math.min(a+1, b); i<l; i++){
		var bx=Math.floor(b/(i+1));
		var bi=b%(i+1);
		var ax=i===0?a:a-i+1;
		var ai=Math.max(0, i-1);
		var x=ax*ax+ai  -  (bx+1)*(bx+1)*bi-bx*bx*(i+1-bi);
		// print(i, x)
		if(x>ans){
			ans=x;
			t=i;
		}else{
			//break;
		}
	}

	var bx=Math.floor(b/(t+1));
	var aa=[];
	var bb=[];
	var sb=[];
	for(var j=0; j<bx; j++){
		sb.push('x');
	}
	sb=sb.join('');
	for(var j=0, l=t+1-b%(t+1); j<l; j++){
		bb.push(sb);
	}
	for(var j=0, l=b%(t+1); j<l; j++){
		bb.push(sb+'x');
	}
	for(var j=0; j<t-1; j++){
		aa.push('o');
	}
	var sa=[];
	// if(a!==0){
	for(var j=0; j<a-t+1; j++){
		sa.push('o');
	}
	// }

	sa=sa.join('');
	aa.push(sa);
	aa.push('');
	var ans2=[];
	for(var j=0; j<i; j++){
		ans2.push(bb[j]);
		ans2.push(aa[j]);
	}
	return ans+'\n'+ans2.join('');
}.apply(0, readline().split(' ').map(Number)));


print(function(a, b){
	if(b===0){
		var ans=[];
		for(var i=0; i<a; i++){
			ans.push('o');
		}
		return a*a + '\n' + ans.join('');
	}
	var ans=-1e20;
	var t=-1;
	for(var i=1, l=Math.min(a+1, b); i<=l; i++){
		var bx=Math.floor(b/i);
		var bi=b%i;
		var ai=i<=2 ? 0 : i-2;
		var ax=a-ai;
		var x = ax*ax+ai - (bx+1)*(bx+1)*bi - bx*bx*(i-bi);
		if(x>ans){
			ans=x;
			t=i;
		}else{
			break;
		}
	}

	var bx=Math.floor(b/t);
	var bi=b%t;
	var ai=t<=2 ? 0 : t-2;
	var ax=a-ai;

	var aa=[];
	var bb=[];
	var sb1=repeat(bx+1, 'x');
	var sb2=repeat(bx, 'x');
	for(var i=0; i<bi; i++){
		bb.push(sb1);
	}
	for(var i=0; i<b-bi; i++){
		bb.push(sb2);
	}
	for(var i=0; i<ai; i++){
		aa.push('o');
	}
	aa.push(repeat(ax, 'o'));
	aa.push('');

	var ans2=[];
	for(var i=0; i<t; i++){
		ans2.push(bb[i]);
		ans2.push(aa[i]);
	}
	return ans+'\n'+ans2.join('');
}.apply(0, readline().split(' ').map(Number)));
function repeat(n, c){
	var s='';
	while(n--) s+=c;
	return s;
}


print(function(a, b){
	if(a===0){
		var ans=[];
		for(var i=0; i<b; i++){
			ans.push('x');
		}
		return -b*b + '\n' + ans.join('');
	}
	if(b===0){
		var ans=[];
		for(var i=0; i<a; i++){
			ans.push('o');
		}
		return a*a + '\n' + ans.join('');
	}
	var ans=-1e20;
	var t=-1;
	for(var i=0,l=Math.min(a+1, b); i<l; i++){
		var bx=Math.floor(b/(i+1));
		var bi=b%(i+1);
		var ax=i===0?a:a-i+1;
		var ai=Math.max(0, i-1);
		var x=ax*ax+ai  -  (bx+1)*(bx+1)*bi-bx*bx*(i+1-bi);
		// print(i, x)
		if(x>ans){
			ans=x;
			t=i;
		}else{
			//break;
		}
	}

	var bx=Math.floor(b/(t+1));
	var aa=[];
	var bb=[];
	var sb=[];
	for(var j=0; j<bx; j++){
		sb.push('x');
	}
	sb=sb.join('');
	for(var j=0, l=t+1-b%(t+1); j<l; j++){
		bb.push(sb);
	}
	for(var j=0, l=b%(t+1); j<l; j++){
		bb.push(sb+'x');
	}
	for(var j=0; j<t-1; j++){
		aa.push('o');
	}
	var sa=[];
	// if(a!==0){

	for(var j=0, l=t===0?a:a-t+1; j<l; j++){
		sa.push('o');
	}
	// }

	sa=sa.join('');
	aa.push(sa);
	aa.push('');
	var ans2=[];
	for(var j=0; j<i; j++){
		ans2.push(bb[j]);
		ans2.push(aa[j]);
	}
	return ans+'\n'+ans2.join('');
}.apply(0, readline().split(' ').map(Number)));


print(function(a, b){
	var ans=[];
	var left=Math.floor(b/2);
	var right=Math.ceil(b/2);
	for(var i=0; i<left; i++){
		ans.push('x');
	}
	for(var i=0; i<a; i++){
		ans.push('o');
	}
	for(var i=0; i<right; i++){
		ans.push('x');
	}
	return (a*a-left*left-right*right)+'\n'+ans.join('');
}.apply(0, readline().split(' ').map(Number)));


print(function(a, b){
	if(b===0){
		var ans=[];
		for(var i=0; i<a; i++){
			ans.push('o');
		}
		return a*a + '\n' + ans.join('');
	}
	var ans=-1e20;
	var t=-1;
	for(var i=1, l=Math.min(a+1, b); i<=l; i++){
		var bx=Math.floor(b/i);
		var bi=b%i;
		var ai=i<=2 ? 0 : i-2;
		var ax=a-ai;
		var x = ax*ax+ai - (bx+1)*(bx+1)*bi - bx*bx*(i-bi);
		if(x>ans){
			ans=x;
			t=i;
		}
		// else{
		// 	break;
		// }
	}

	var bx=Math.floor(b/t);
	var bi=b%t;
	var ai=t<=2 ? 0 : t-2;
	var ax=a-ai;

	var aa=[];
	var bb=[];
	var sb1=repeat(bx+1, 'x');
	var sb2=repeat(bx, 'x');
	for(var i=0; i<bi; i++){
		bb.push(sb1);
	}
	for(var i=0; i<b-bi; i++){
		bb.push(sb2);
	}
	for(var i=0; i<ai; i++){
		aa.push('o');
	}
	aa.push(repeat(ax, 'o'));
	aa.push('');

	var ans2=[];
	for(var i=0; i<t; i++){
		ans2.push(bb[i]);
		ans2.push(aa[i]);
	}
	return ans+'\n'+ans2.join('');
}.apply(0, readline().split(' ').map(Number)));
function repeat(n, c){
	var s='';
	while(n--) s+=c;
	return s;
}


print(function(a, b){
	var ans=[];
	for(var i=0, l=Math.floor(b/2); i<l; i++){
		ans.push('x');
	}
	for(var i=0; i<a; i++){
		ans.push('o');
	}
	for(var i=0, l=Math.ceil(b/2); i<l; i++){
		ans.push('x');
	}
	return ans.join('');
}.apply(0, readline().split(' ').map(Number)));


print(function(a, b){
	if(a===0){
		var ans=[];
		for(var i=0; i<b; i++){
			ans.push('x');
		}
		return -b*b + '\n' + ans.join('');
	}
	if(b===0){
		var ans=[];
		for(var i=0; i<a; i++){
			ans.push('o');
		}
		return a*a + '\n' + ans.join('');
	}
	var ans=-1e20;
	var t=-1;
	for(var i=0,l=Math.min(a+1, b); i<l; i++){
		var bx=Math.floor(b/(i+1));
		var bi=b%(i+1);
		var x=(a-i)*(a-i)+i  -  (bx+1)*(bx+1)*bi-bx*bx*(i+1-bi);
		if(x>ans){
			ans=x;
			t=i;
		}else{
			break;
		}
	}

	var bx=Math.floor(b/(t+1));
	var aa=[];
	var bb=[];
	var sb=[];
	for(var j=0; j<bx; j++){
		sb.push('x');
	}
	sb=sb.join('');
	for(var j=0, l=t+1-b%(t+1); j<l; j++){
		bb.push(sb);
	}
	for(var j=0, l=b%(t+1); j<l; j++){
		bb.push(sb+'x');
	}
	for(var j=0; j<t-1; j++){
		aa.push('o');
	}
	var sa=[];
	// if(a!==0){
	for(var j=0; j<a-t+1; j++){
		sa.push('o');
	}
	// }

	sa=sa.join('');
	aa.push(sa);
	aa.push('');
	var ans2=[];
	for(var j=0; j<i; j++){
		ans2.push(bb[j]);
		ans2.push(aa[j]);
	}
	return ans+'\n'+ans2.join('');
}.apply(0, readline().split(' ').map(Number)));


print(function(a, b){
	var i, l, ans=-1e20, t=-1;

	if(b===0){
		ans=[];
		for(i=0; i<a; i++){
			ans.push('o');
		}
		return a*a + '\n' + ans.join('');
	}

	for(i=1, l=Math.min(a+1, b); i<=l; i++){
		var bx=Math.floor(b/i);
		var bi=b%i;
		var ai=i<=2 ? 0 : i-2;
		var ax=a-ai;
		var x = ax*ax+ai - (bx+1)*(bx+1)*bi - bx*bx*(i-bi);
		if(x>ans){
			ans=x;
			t=i;
		}
	}

	var bx=Math.floor(b/t);
	var bi=b%t;
	var ai=t<=2 ? 0 : t-2;
	var ax=a-ai;
	var sb1=repeat(bx+1, 'x');
	var sb2=repeat(bx, 'x');

	var ans2='';
	for(i=0; i<t; i++){
		ans2+= (i<bi?sb1:sb2)+(i<ai?'0':i===ai?repeat(ax, 'o'):'');
	}
	return ans+'\n'+ans2;
}.apply(0, readline().split(' ').map(Number)));
function repeat(n, c){
	var s='';
	while(n--) s+=c;
	return s;
}


print(function(a, b){
	var ans=[];
	var left=Math.floor(b/2);
	var right=Math.ceil(b/2);
	for(var i=0; i<left; i++){
		ans.push('x');
	}
	for(var i=0; i<a; i++){
		ans.push('o');
	}
	for(var i=0; i<right; i++){
		ans.push('x');
	}

	return (a===0 ? -b*b : a*a-left*left-right*right)+'\n'+ans.join('');
}.apply(0, readline().split(' ').map(Number)));


print(function(a, b){

	var ans=-1e20;
	var t=-1;
	for(var i=0,l=Math.min(a+1, b); i<=l; i++){
		var bx=Math.floor(b/(i+1));
		var bi=b%(i+1);
		var x=(a-i)*(a-i)+i  -  (bx+1)*(bx+1)*bi-bx*bx*(i+1-bi);
		if(x>ans){
			ans=x;
			t=i;
		}else{
			break;
		}
	}

	var bx=Math.floor(b/(t+1));
	var aa=[];
	var bb=[];
	var sb=[];
	for(var j=0; j<bx; j++){
		sb.push('x');
	}
	sb=sb.join('');
	for(var j=0, l=t+1-b%(t+1); j<l; j++){
		bb.push(sb);
	}
	for(var j=0, l=b%(t+1); j<l; j++){
		bb.push(sb+'x');
	}
	for(var j=0; j<t-1; j++){
		aa.push('o');
	}
	var sa=[];
	if(a!==0){
		for(var j=0; j<a-t+1; j++){
			sa.push('o');
		}
	}
	// print(t)
	sa=sa.join('');
	aa.push(sa);
	aa.push('');
	var ans2=[];
	for(var j=0; j<i; j++){
		ans2.push(bb[j]);
		ans2.push(aa[j]);
	}
	return ans+'\n'+ans2.join('');
}.apply(0, readline().split(' ').map(Number)));