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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

public class Solution implements Runnable
{
    private void solve() throws IOException
        {
            int n = nextInt();
            int t = nextInt();

            Glass[][] array = new Glass[n][n];
            int ans = 0;

            if (t == 0)
                writer.print( 0 );

            else {
                for (int i = 0; i < n; i++) {
                    for (int j = 0; j<=i; j++) {
                        array[i][j] = new Glass(i);
                    }
                }

                int level = 0;
                int time = t;
                while (time > 0) {
                    for (int i = 0; i < n; i++) {
                        if (i > level )
                            break;
                        for (int j = 0; j<=i; j++) {
                            Glass glass = array[i][j];
                            if (i==0 && j==0)
                                glass.value += 1d;

                             if (glass.value > 1) {
                                if(glass.level == level)
                                    level++;


                                double excessVol = glass.value - 1d;
                                glass.value = 1d;
                                if (glass.level + 1 < n) {
                                    Glass leftGlass = array[glass.level+1][j];
                                    Glass rightGlass = array[glass.level+1][j+1];
                                    leftGlass.value += excessVol/2;
                                    rightGlass.value += excessVol/2;
                                }
                            }
                        }
                    }
                    time--;
                }
                for (int i = 0; i < n; i++) {
                    for (int j = 0; j<=i; j++) {
                        if (array[i][j].value >= 1)
                            ans++;
                    }
                }
                writer.print( ans );

            }


        }

    private static class Glass {
        double value;
        int level;

        public Glass (int level) {
            this.level = level;
        }
    }


    private String binaryXOR (String s1, String s2) {
        BigInteger a = new BigInteger( s1,2 );
        BigInteger b = new BigInteger( s2,2 );

        return a.xor( b ).toString(2);

    }


    private static void findDP( Node node )
    {
        for ( Node child : node.children )
        {
            if ( child.value > node.value )
            {
                child.dp = Math.max( child.dp, node.dp+1 );
                //findDP( child );
            }
        }
    }

    private static class Obj implements Comparable<Obj> {
        String name;
        int value;

        public Obj(int value) {
            this.value = value;
        }

        public Obj(String name, int value) {
            this.name = name;
            this.value = value;
        }

        @Override
        public int compareTo(Obj o) {
            return o.value-this.value;
        }
    }


    private static class Node
    {
        long value;
        long dp;
        List<Node> children;
        Node parent;

        public Node( int value )
        {
            this.value = value;
            dp = 1;
            children = new ArrayList<Node>();
        }
    }

    private static boolean isInt (String s) {
    	if (s.length() < 1)
    		return false;
    	else {
    		for (char c : s.toCharArray()) {
    			if (c < '0' || c > '9') {
    				return false;
    			}
    		}
    	}

    	return true;
    }

    private static Map<String,Integer> findSubString(String s, int k) {
        Map<String,Integer> map = new HashMap<>(  );
        for (int i = 0; i < s.length() - (k - 1); i++) {
            String str = new String( s.substring( i,i+k ) );
            if (map.containsKey( str )) {
                map.put( str, map.get( str ) + 1 );
            }
            else {
                map.put( str, 1 );

            }
        }

        return map;
    }



    //mergesort

    public static Comparable[] mergeSort(Comparable[] list)
    {
        if (list.length <= 1) {
            return list;
        }

        Comparable[] left = new Comparable[list.length / 2];
        Comparable[] right = new Comparable[list.length - left.length];
        System.arraycopy(list, 0, left, 0, left.length);
        System.arraycopy(list, left.length, right, 0, right.length);

        mergeSort(left);
        mergeSort(right);

        merge(left, right, list);
        return list;
    }

    private static void merge(Comparable[] left, Comparable[] right, Comparable[] result)
    {
        int leftIdx = 0;
        int rightIdx = 0;
        int index = 0;

        while (leftIdx < left.length && rightIdx < right.length)
        {
            if (left[leftIdx].compareTo(right[rightIdx]) < 0)
            {
                result[index++] = left[leftIdx];
                leftIdx++;
            }
            else
            {
                result[index++] = right[rightIdx];
                rightIdx++;
            }
        }

        System.arraycopy(left, leftIdx, result, index, left.length - leftIdx);
        System.arraycopy(right, rightIdx, result, index, right.length - rightIdx);
    }

    public static List<Obj> mergeSort(List<Obj> list) {
        if (list.size() <= 1) {
            return list;
        }

        List<Obj> left = new ArrayList(list.subList( 0, list.size()/2 ));
        List<Obj> right = new ArrayList (list.subList( left.size(), list.size() ));

        left = mergeSort(left);
        right = mergeSort(right);

        list = merge(left, right);

        return list;
    }

    private static List<Obj> merge(List<Obj> left,List<Obj> right)
   {
      int leftCounter = 0, rightCounter = 0;
       List<Obj> result = new ArrayList<>(  );

       while (leftCounter < left.size() && rightCounter < right.size()) {
           Obj leftItem = left.get( leftCounter );
           Obj rightItem = right.get( rightCounter );

           if ( leftItem.compareTo( rightItem ) < 0) {
               result.add( leftItem );
               leftCounter++;
            }
            else
            {
                result.add( rightItem );
                rightCounter++;
            }
       }

       if (leftCounter >= left.size())
           result.addAll( right.subList( rightCounter, right.size() ) );
       else if (rightCounter >= right.size())
           result.addAll( left.subList( leftCounter, left.size() ) );

       return result;
   }

    public static void main(String[] args) {
        new Solution().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}