Mary has just graduated from one well-known University and is now attending celebration party. Students like to dream of a beautiful life, so they used champagne glasses to construct a small pyramid. The height of the pyramid is n. The top level consists of only 1 glass, that stands on 2 glasses on the second level (counting from the top), then 3 glasses on the third level and so on.The bottom level consists of n glasses.

Vlad has seen in the movies many times how the champagne beautifully flows from top levels to bottom ones, filling all the glasses simultaneously. So he took a bottle and started to pour it in the glass located at the top of the pyramid.

Each second, Vlad pours to the top glass the amount of champagne equal to the size of exactly one glass. If the glass is already full, but there is some champagne flowing in it, then it pours over the edge of the glass and is equally distributed over two glasses standing under. If the overflowed glass is at the bottom level, then the champagne pours on the table. For the purpose of this problem we consider that champagne is distributed among pyramid glasses immediately. Vlad is interested in the number of completely full glasses if he stops pouring champagne in t seconds.

Pictures below illustrate the pyramid consisting of three levels.

<image> <image>

Input

The only line of the input contains two integers n and t (1 ≤ n ≤ 10, 0 ≤ t ≤ 10 000) — the height of the pyramid and the number of seconds Vlad will be pouring champagne from the bottle.

Output

Print the single integer — the number of completely full glasses after t seconds.

Examples

Input

3 5


Output

4


Input

4 8


Output

6

Note

In the first sample, the glasses full after 5 seconds are: the top glass, both glasses on the second level and the middle glass at the bottom level. Left and right glasses of the bottom level will be half-empty.
import java.io.*;
import java.util.*;

public class Timus1177 implements Runnable {

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

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Throwable e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

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

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

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

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

    public static void main(String[] args) {
        new Thread(null, new Timus1177(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

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

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    long[][] capacity;
    int n;

    long STEP = 1 << 20;

    void add(int level, int num, long cnt) {
        if (level > n) return;
        capacity[level][num] += cnt;
        if (capacity[level][num] > STEP) {
            long other = capacity[level][num] - STEP;
            capacity[level][num] = STEP;
            add(level + 1, num, other / 2);
            add(level + 1, num + 1, other / 2);
        }
    }

    void solve() throws IOException {
        n = readInt();
        int t = readInt();

        capacity = new long[30][30];

        add(1, 1, STEP * t);

        int ans = 0;
        for (long[] x : capacity) {
            for (long y : x) {
                if (y == STEP) ans ++;
            }
        }
        out.println(ans);


    }


    static final class LongIntHashMap {
        final static class Entry {
            final long key;
            int value;
            Entry next;

            Entry(long key, int value, Entry next) {
                this.key = key;
                this.value = value;
                this.next = next;
            }
        }

        private Entry[] table;
        private int capacity;
        private int threshold;
        private int size;

        public LongIntHashMap() {
            this(16);
        }

        @SuppressWarnings("unchecked")
        public LongIntHashMap(int capacity) {
            this.capacity = capacity;
            this.threshold = capacity * 4 / 3;
            this.table = new Entry[capacity];
        }

        public boolean containsKey(long key) {
            final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;

            for (Entry entry = table[index]; entry != null; entry = entry.next) {
                if (entry.key == key) {
                    return true;
                }
            }
            return false;
        }

        public int get(long key) {
            final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
            for (Entry entry = table[index]; entry != null; entry = entry.next) {
                if (entry.key == key) {
                    return entry.value;
                }
            }
            return 0;
        }

        public int put(long key, int value) {
            final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
            final Entry entryOriginal = table[index];
            for (Entry entry = entryOriginal; entry != null; entry = entry.next) {
                if (entry.key == key) {
                    int oldValue = entry.value;
                    entry.value = value;
                    return oldValue;
                }
            }
            table[index] = new Entry(key, value, entryOriginal);
            size++;
            if (size > threshold) {
                setCapacity(2 * capacity);
            }
            return 0;
        }

        public int remove(long key) {
            int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
            Entry previous = null;
            Entry entry = table[index];
            while (entry != null) {
                Entry next = entry.next;
                if (entry.key == key) {
                    if (previous == null) {
                        table[index] = next;
                    } else {
                        previous.next = next;
                    }
                    size--;
                    return entry.value;
                }
                previous = entry;
                entry = next;
            }
            return 0;
        }

        public void clear() {
            size = 0;
            Arrays.fill(table, null);
        }

        public int size() {
            return size;
        }

        public void setCapacity(int newCapacity) {
            @SuppressWarnings("unchecked")
            Entry[] newTable = new Entry[newCapacity];
            int length = table.length;
            for (int i = 0; i < length; i++) {
                Entry entry = table[i];
                while (entry != null) {
                    long key = entry.key;
                    int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % newCapacity;

                    Entry originalNext = entry.next;
                    entry.next = newTable[index];
                    newTable[index] = entry;
                    entry = originalNext;
                }
            }
            table = newTable;
            capacity = newCapacity;
            threshold = newCapacity * 4 / 3;
        }

        /**
         * Target load: 0,6
         */
        public void reserveRoom(int entryCount) {
            setCapacity(entryCount * 5 / 3);
        }

    }

}