{$Mode objfpc}

const
    maxN= 100;
    base= 1000000007;

var
    c, f, res: array[0.. maxN, 0.. maxN* maxN] of int64;
    d: array[0.. maxN, 0.. maxN, 0.. maxN] of int64;
    i, j, k, g, n, z: integer;
    m: int64;

function power(x, y: int64): int64;
var
    t: int64;
begin
    if y= 1 then exit(x mod base);
    t:= power(x, y div 2);
    if odd(y) then result:= ( (t* t) mod base )* x mod base else
        result:= t* t mod base;
end;

begin
//    assign(input, '144d.in'); reset(input);

    readln(n, m, k);
    if k> sqr(n) div 2  then k:= sqr(n)- k;
    for i:= 0 to n do c[i, 0]:= 1;
    for i:= 1 to n do
        for j:= 1 to i do c[i, j]:= (c[i- 1, j]+ c[i- 1, j- 1]) mod base;

    for i:= 0 to n do
        for j:= 0 to i do
            begin
                d[i, j, 1]:= power(c[i, j], m div n+ 1);
                d[i, j, 2]:= power(c[i, j], m div n);
            end;
    res[0, 0]:= 1;
    z:= m mod n;
    for i:= 1 to n do
        for j:= 0 to k do
           begin
               f[i, j]:= 0;
               for g:= 0 to n do if j>= g then
                   begin
                       if i<= z then res[i, j]:= (res[i, j] + d[n, g, 1]* res[i- 1, j- g] ) mod base else
                           res[i, j]:= (res[i, j]+ d[n, g, 2]* res[i- 1, j- g]) mod base
                   end else break;
           end;
    writeln(res[n, k]);
end.

uses math;
const md=1000000007;
var mc,ma,ma1:array[-2..102,-2..102] of int64;
    dp:array[-2..102,-2..10005] of int64;
    i,j,g:longint;
    n,m,k,x,y,t:int64;
function f(a,b:int64):int64;
var p,r:int64;
begin
  if b=0 then exit(1);
  p:=f(a,b shr 1);
  r:=(p*p) mod md;
  if b and 1=1 then r:=(r*a) mod md;
  f:=r;
end;
begin
  readln(n,m,k);
  mc[0,0]:=1;
  for i:=1 to n do
   for j:=0 to i do
    mc[i,j]:=(mc[i-1,j]+mc[i-1,j-1]) mod md;
  x:=m div n;
  y:=m mod n;
  for j:=0 to n do
   begin
     ma[n,j]:=f(mc[n,j],x);
     ma1[n,j]:=(ma[n,j]*mc[n,j]) mod md;
   end;
  dp[0,0]:=1;
  for i:=1 to n do
   for j:=0 to min(i*n,k) do
    for g:=max(0,j-n) to min((i-1)*n,j) do
     begin
       if y<i then t:=ma[n,j-g] else t:=ma1[n,j-g];
       dp[i,j]:=(dp[i,j]+dp[i-1,g]*t) mod md;
     end;
  writeln(dp[n,k]);
end.

{$mode objfpc}
{$R-,Q-,H-,S-,I-}

const           InputFile               =       '';
                maxN                    =       100;
                maxK                    =       maxN * maxN;
                baseD                   =       trunc( 1E9 ) + 7;

type            Int                     =       int64;

var             n , k , i , j           :       integer;
                p , t , nn              :       integer;
                m                       :       int64;
                f , c , d1 , d2         :       array [0 .. maxN , 0 .. maxK] of Int;

function Power( const a , b : Int ) : Int;
        var     t       :       Int;
        begin
                if b = 0 then exit( 1 );
                if b = 1 then exit( a );
                t := Power( a , b div 2 );
                result := ( t * t ) mod baseD;
                if odd( b ) then result := ( result * a ) mod baseD;
        end;

begin
                assign( input , InputFile ); reset( input );
                readln( n , m , k );
                if 2 * k >= sqr( n ) then k := sqr( n ) - k;
                for i := 0 to n do c[i][0] := 1;
                for i := 1 to n do
                for j := 1 to i do
                        c[i][j] := ( c[i - 1][j] + c[i - 1][j - 1] ) mod baseD;
                for i := 0 to n do
                for j := 0 to i do
                        begin
                                d1[i][j] := power( c[i][j] , m div n + 1 );
                                d2[i][j] := power( c[i][j] , m div n );
                        end;
                f[0][0] := 1; t := m mod n;
                for i := 1 to n do
                for j := 0 to k do
                        begin
                                if j > n then nn := n else nn := j;
                                for p := 0 to nn do
                                if i <= t then
                                        f[i][j] := ( f[i][j] + f[i - 1][j - p] * d1[n][p] ) mod baseD
                                else
                                        f[i][j] := ( f[i][j] + f[i - 1][j - p] * d2[n][p] ) mod baseD;
                        end;
                writeln( f[n][k] );
end.

{$mode objfpc}
{$R-,Q-,H-,S-,I-}

const           InputFile               =       'Table.inp';
                maxN                    =       100;
                maxK                    =       maxN * maxN;
                baseD                   =       trunc( 1E9 ) + 7;

type            Int                     =       int64;

var             n , k , i , j           :       integer;
                p , t , nn              :       integer;
                m                       :       int64;
                f , c , d1 , d2         :       array [0 .. maxN , 0 .. maxK] of Int;

function Power( const a , b : Int ) : Int;
        var     t       :       Int;
        begin
                if b = 0 then exit( 1 );
                if b = 1 then exit( a );
                t := Power( a , b div 2 );
                result := ( t * t ) mod baseD;
                if odd( b ) then result := ( result * a ) mod baseD;
        end;

begin
                readln( n , m , k );
                if 2 * k >= sqr( n ) then k := sqr( n ) - k;
                for i := 0 to n do c[i][0] := 1;
                for i := 1 to n do
                for j := 1 to i do
                        c[i][j] := ( c[i - 1][j] + c[i - 1][j - 1] ) mod baseD;
                for i := 0 to n do
                for j := 0 to i do
                        begin
                                d2[i][j] := power( c[i][j] , m div n );
                                //d1[i][j] := power( c[i][j] , m div n + 1 );
                                d1[i][j] := ( d2[i][j] * c[i][j] ) mod baseD;
                        end;
                f[0][0] := 1; t := m mod n;
                for i := 1 to n do
                for j := 0 to k do
                        begin
                                if j > n then nn := n else nn := j;
                                for p := 0 to nn do
                                if i <= t then
                                        f[i][j] := ( f[i][j] + f[i - 1][j - p] * d1[n][p] ) mod baseD
                                else
                                        f[i][j] := ( f[i][j] + f[i - 1][j - p] * d2[n][p] ) mod baseD;
                        end;
                writeln( f[n][k] );
end.

var b:array[0..100] of int64;
var a:array[0..100,0..10000] of int64;
var c,d:array[0..100] of int64;
var i,j,n,k,x,m1,o,h:longint;
var m,ans,t,s,p,q:int64;
function mi(x,y:int64):int64;
var d:array[1..70] of int64;
var s,ad:longint;
var mii:int64;
begin
d[1]:=x;
s:=trunc(ln(y)/ln(2))+1;
mii:=1;
for ad:=2 to s do d[ad]:=d[ad-1]*d[ad-1] mod o;
for ad:=1 to s do
begin
if y mod 2=1 then mii:=mii*d[ad] mod o;
y:=y div 2;
end;
mi:=mii;
end;
function max(a,b:int64):int64;
begin
if a>b then exit(a)
else exit(b);
end;
begin

        readln(n,m,k);
        if k>n*n div 2 then k:=n*n-k;
        x:=(m-1) mod n+1;
        o:=1000000007;
        b[0]:=1;
        m1:=trunc(ln(o)/ln(2))+1;
        p:=1;
        q:=1;
        for i:=1 to n do
        begin
                p:=p*(n-i+1) mod o;
                q:=q*i mod o;
                s:=o-2;
                b[i]:=p;
                c[1]:=q;
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then b[i]:=b[i]*c[j] mod o;
                        s:=s div 2;
                end;
        end;
        for i:=0 to n do d[i]:=mi(b[i],(m-1) div n);
        for i:=0 to n do c[i]:=d[i]*b[i] mod o;
        fillchar(a,sizeof(a),0);
        for i:=0 to n do a[1,i]:=c[i];
        for i:=2 to x do
        for j:=0 to k do
        for h:=max(j-n,0) to j do
        a[i,j]:=(a[i,j]+a[i-1,h]*c[j-h]) mod o;
        for i:=x+1 to n do
        for j:=0 to k do
        for h:=max(j-n,0) to j do
        a[i,j]:=(a[i,j]+a[i-1,h]*d[j-h]) mod o;
        ans:=a[n,k];
        if k=0 then ans:=1;
        write(ans);

end.

{$R-,S-,Q-,I-,O+}
{$M 64000000}

{$APPTYPE CONSOLE}

uses Math;
const
inf = round(1e9);
maxn = round(1e5)+111;
md = round(1e9)+7;
var
i,j,l,n,k : longint;
m,mdd : int64;
dp,c : array [0..101,0..101] of int64;
ans : array [0..101,0..10010] of int64;
calc : array [1..101] of int64;

function pow (x : int64;p : int64) : int64;
var
res : int64;
begin
 res:=1;
 while p<>0 do
 begin
  if odd (p) then res:=(res*x) mod md;
  x:=(x*x) mod md;
  p:=p shr 1;
 end;
 pow:=res mod md;
end;

begin
 //reset (input,'input.txt');
 //rewrite (output,'output.txt');
 fillchar (c,sizeof(c),0);
 mdd:=int64(md)*int64(md);
 for i:=0 to 100 do c [i,0]:=1;
 for i:=1 to 100 do
  for j:=1 to i do c [i,j]:=(c [i-1,j-1]+c [i-1,j]) mod md;
 readln (n,m,k);
 for i:=1 to n do
 begin
  calc [i]:=m div n;
  if m mod n>=i then inc (calc [i]);
 end;
 for i:=1 to n do
  for j:=0 to n do dp [i,j]:=pow (c [n,j],calc [i]);

 for i:=0 to n do ans [i,0]:=1;
 for i:=1 to n do
  for j:=1 to min(k,i*n) do
  begin
   for l:=0 to min(n,j) do
   begin
    ans [i,j]:=ans [i,j]+ans [i-1,j-l]*dp [i,l];
    while ans [i,j]>mdd do ans [i,j]:=ans [i,j] - mdd;
   end;
   ans [i,j]:=ans [i,j] mod md;
  end;
 writeln (ans [n,k]);
end.

{$apptype console}
{$maxstacksize 5000000}
{$b-}
const md=1000000007;
var
   p,i,j,n,k:integer;
   st,m:int64;
   mdd:int64;
   a:array[0..101,0..101] of integer;
   b:array[1..101,0..101] of int64;
   dp:array[1..101,0..10001] of int64;

   Function power(v,s:int64):int64;
   var
    qq:int64;
   begin
     if s=0 then power:=1 else if s=1 then power:=v mod md else
     begin
       if s mod 2=0 then
       begin
         qq:=power(v,s div 2);
         power:=qq*qq mod md;
       end else power:=v*power(v,s-1) mod md;
     end;
   end;
begin
{ reset(input,'input.txt');
 rewrite(output,'output.txt');}
 readln(n,m,k);
 mdd:=int64(md)*int64(md);
 Fillchar(a,sizeof(a),0);
 for i := 0 to n do a[i,0]:=1;
 for i := 1 to n do
   for j := 1 to i do a[i,j]:=(a[i-1,j-1]+a[i-1,j]) mod md;

 Fillchar(b,sizeof(b),0);
 for i := 1 to n do
 begin
    st:=((m-i) div n)+1;
    for j := 0 to n do
     b[i,j]:=power(a[n,j],st);
 end;

 Fillchar(dp,sizeof(dp),0);
 for i := 0 to n do dp[1,i]:=b[1,i];
 for i := 2 to n do
   for j := 0 to k do
   begin
     for p := 0 to n do
       begin
         if (j-p<0) then break;
         dp[i,j]:=(dp[i,j]+dp[i-1,j-p]*b[i,p]);
         while dp[i,j]>mdd do dp[i,j]:=dp[i,j]-mdd;

       end;
       dp[i,j]:=dp[i,j] mod md;
   end;
   writeln(dp[n,k] mod md);
end.

uses Math;
const
        fil='';
        fil2='';
        base=trunc(1e9)+7;
        maxn=100;
var
        n,k:longint; m:int64;
        c:array[-1..maxn,-1..maxn] of int64;
        dp:array[0..maxn,0..maxn*maxn] of longint;
        t:array[0..maxn,1..maxn] of int64;
procedure nhap;
var i,j:longint;
begin
        assign(input,fil); reset(input);
        assign(output,fil2); rewrite(output);
        readln(n,m,k);
        c[-1,-1]:=1;
        for i:=0 to n do
                for j:=0 to n do
                        c[i,j]:=(c[i-1,j]+c[i-1,j-1]) mod base;
end;
function pow(x,y:int64):int64;
var p:int64;
begin
        if y=0 then exit(1);
        p:=pow(x,y div 2);
        p:=(p*p) mod base;
        if odd(y) then p:=(p*x) mod base;
        exit(p);
end;
procedure xuli;
var i,j,x:longint; y:int64;
begin
        for i:=1 to n do
        begin
                y:=(m-i+1) div n;
                if (m-i+1) mod n <> 0 then inc(y);
                for j:=0 to n do t[j,i]:=pow(c[n,j],y);
        end;
        dp[0,0]:=1;
        for i:=1 to n do
                for j:=0 to min(i*n,k) do
                        for x:=0 to min(n,j) do
                                dp[i,j]:=(dp[i,j]+dp[i-1,j-x]*t[x,i]) mod base;
        writeln(dp[n,k]);
end;
begin
        nhap;
        xuli;
end.

uses math;
const
        nmax    =       101;
        modul   =       1000000007;
var
        n,k:longint;
        m:int64;
        sl:Array[0..nmax] of int64;
        c:Array[0..nmax,0..nmax] of longint;
        f:Array[0..nmax,0..nmax*nmax] of int64;
        d:array[0..nmax,0..nmax] of int64;
procedure nhap;
var i,j,u,v:longint;
begin
        read(n,m,k);
        c[0][0]:=1;
        for i:=1 to n do for j:=0 to i do if (j=0)or(j=i) then c[i][j]:=1
        else c[i][j]:=(c[i-1][j-1]+c[i-1][j])mod modul;
        for i:=1 to n do sl[i]:=(((m-i)div n)+1);
end;
function mu(i,j:int64):int64;
var tg:int64;
begin
        if j=0 then exit(1);
        if j=1 then exit(i);
        tg:=mu(i,j div 2);
        tg:=(tg*tg)mod modul;
        if j mod 2=1 then tg:=(tg*i)mod modul;
        exit(tg);
end;
procedure init;
var i,j:longint;
begin
        for i:=1 to n do for j:=0 to n do
          d[i][j]:=mu(c[n][j],sl[i]);
end;
procedure xuly;
var i,j,u,v:longint;
begin
        init;
        f[0][0]:=1;
        for i:=0 to n-1 do for j:=0 to min(n*i,k) do if f[i][j]>0 then
            for u:=0 to min(n,k-j) do
              f[i+1][j+u]:=(f[i+1][j+u]+(f[i][j]*d[i+1][u])mod modul)mod modul;
        writeln(f[n][k]);
end;
begin
        assign(input,'');reset(input);
        assign(output,'');rewrite(output);
          nhap;
          xuly;
        close(input);
        close(output);
end.

uses math;
const module=1000000007;
var tt,tmp,i,j,n,t,k:longint;
    q,m:int64;
    c:array[0..110,0..110] of int64;
    f:array[0..110,0..10010] of int64;
    p1,p:array[0..11000] of int64;
   function pow(x,n:int64):int64;
    var q,res:int64;
     begin
       q:=x;
       res:=1;
       while n>0 do
        begin
          if n and int64(1)=int64(1) then res:=(res*q) mod module;
          q:=(q*q) mod module;
          n:=n div 2;
        end;
       pow:=res;
     end;

   function pow2(x,n:int64):int64;
    begin
      if n=0 then exit(1);
      if n mod 2=0 then begin x:=pow2(x,n div 2); exit((x*x) mod module); end
      else begin pow2:=(x*pow2(x,n-1)) mod module; exit; end;

    end;

 begin
   read(n,m,k);

   for i:=0 to 100 do
    c[i][0]:=1;

   for i:=1 to 100 do
    for j:=1 to 100 do
     c[i][j]:=(c[i-1][j]+c[i-1][j-1]) mod module;

   if (false) then
    begin
      for i:=1 to 5 do
       begin
         for j:=1 to 5 do
          write(c[i][j]:4);
         writeln;
       end;
      halt(0);
    end;

   for i:=0 to n do
    p[i]:=pow(c[n][i],m div n);
   for i:=0 to n do
    p1[i]:=pow(c[n][i],(m div n)+1);

   tt:=m mod n;

   fillchar(f,sizeof(f),0);
   f[n+1][0]:=1;
   for i:=n downto 1 do
     for j:=0 to k do
      for t:=0 to min(j,n) do
       if f[i+1][j-t]<>0 then
       begin
         if i<=tt then q:=p1[t]
                  else q:=p[t];
         f[i][j]:=(f[i][j]+f[i+1][j-t]*q) mod module;
       end;
//   writeln(tmp);
   if (false) then
    begin
      writeln;

      for i:=1 to n do
       begin
         for j:=1 to k do
          write(f[i][j]:4);
         writeln;
       end;

    end;

   writeln(f[1][k]);
 end.

const p:int64=1000000007;

var n,m,k,s,t:int64;
    i,j,x,y:longint;
    a:array[0..101] of int64;
    v,w:array[0..101,0..20001] of int64;

function tt(x,y:int64):int64;
 begin
  if y=0 then tt:=1 mod p
         else
  if y=1 then tt:=x mod p
         else begin
               if y mod 2=0 then begin
                                  x:=tt(x,y div 2);
                                  tt:=x*x mod p;
                                 end
                            else tt:=x*tt(x,y-1) mod p;
              end;
 end;

 begin
  read(n,m,k);

  a[0]:=1;
  for i:=1 to n do
   a[i]:=a[i-1]*int64(i) mod p;

  for i:=0 to n do
   begin
    s:=(a[n]*tt(a[i],p-2) mod p)*tt(a[n-i],p-2) mod p;

    t:=m div n;
    if m mod n>=i then t:=t+1;

    for j:=1 to n do
     begin
      t:=m div n;
      if m mod n>=int64(j) then t:=t+1;

      w[i,j mod n]:=tt(s,t);
     end;

   end;

  v[0,0]:=1;
  for i:=1 to n do
   begin

    for x:=0 to k do
     if v[i-1,x]>0 then begin
                         for y:=0 to n do
                          v[i,x+y]:=(v[i,x+y]+v[i-1,x]*w[y,i mod n]) mod p;
                        end;

   end;

  writeln(v[n,k]);
 end.

const mo=1000000007;
         size=110;
var i,j,t,n,k:longint;
      m:int64;
	  c,f,q:array[-1..size,-1..size*size] of int64;
procedure init;
begin
readln(n,m,k);
end;
function min(u,v:int64):int64;
begin
if u>v then exit(v) else exit(u);
end;
function max(u,v:int64):int64;
begin
if u<v then exit(v) else exit(u);
end;
function p(u,v:int64):int64;
var tmp:int64;
begin
if v=0 then exit(1);
tmp:=p(u,v shr 1);
tmp:=tmp*tmp mod mo;
if odd(v) then tmp:=tmp*u mod mo;
exit(tmp);
end;
procedure ready;
begin
c[1,1]:=1; c[1,0]:=1;
for i:=2 to n do
	for j:=0 to i do c[i,j]:=(c[i-1,j]+c[i-1,j-1]) mod mo;
for i:=0 to n do
	for j:=0 to n do
		q[i,j]:=p(c[n,i],(m-j) div n+1);
end;

procedure main;
begin
f[0,0]:=1;
for i:=1 to n do
	for j:=0 to min(k,n*i) do begin
		for t:=max(j-n,0) to j do
			//f[i,j]:=(f[i,j]+f[i-1,t]*p(c[n,j-t],(m-i) div n+1)) mod mo;
		    f[i,j]:=(f[i,j]+f[i-1,t]*q[j-t,i]) mod mo;
		//writeln(i,' ',j,' ',f[i,j]);
		end;
writeln(f[n,k]);
end;
begin
init;
ready;
main;
end.

Uses math;
Var i,j:longint;
    rez:int64;
    n,m,k:int64;
    st:array[0..100] of int64;
    d,f:array[0..100,0..10000] of int64;
    mo:int64;
    t0,tt0,pp:int64;
    ans:array[0..100,0..100] of int64;
    bb:array[0..100] of int64;
    ch,zn:array[1..100] of int64;
    ab:array[0..100] of int64;

Procedure power(step:int64);

Begin

if step=1 then begin t0:=pp mod mo; exit; end;

power(step div 2);

tt0:=(t0*t0) mod mo;

if step mod 2=1 then tt0:=(tt0*pp) mod mo;

t0:=tt0 mod mo;

end;

Function ask(ii,ll:longint):int64;

Var i,j:longint; t,tt:int64;

Begin

if f[ii,ll]=1 then begin ask:=d[ii,ll]; exit; end;
if ii=n then begin t0:=ans[ll,ii]; d[ii,ll]:=t0; f[ii,ll]:=1; ask:=t0; exit; end;

tt:=0;

for i:=0 to min(n,ll) do
    if (ll-i<=(n-(ii+1)+1)*n) then tt:=(tt+ans[i,ii]*ask(ii+1,ll-i)) mod mo;

f[ii,ll]:=1;
d[ii,ll]:=tt;
ask:=tt;

end;

Function bin(ii:longint):int64;

Var i,j,lch,lzn:longint; e,w:int64;

Begin

e:=1;

for i:=n-ii+1 to n do e:=(e*i) mod mo;

for i:=1 to ii do e:=(e*ab[i]) mod mo;

bin:=e;

end;

Begin mo:=1000000000+7;

Readln(n,m,k);

for i:=1 to n do st[i]:=((m-i) div n)+1;
for i:=0 to n do begin pp:=i; power(mo-2); ab[i]:=t0; end;
for i:=0 to n do bb[i]:=bin(i);
for i:=0 to n do
 for j:=1 to n do Begin
 pp:=bb[i];
 power(st[j]); ans[i,j]:=t0; end;

Writeln(ask(1,k));

End.

const mo=1000000007;
         size=110;
var i,j,t,n,k:longint;
      m:int64;
	  c,f,q:array[-1..size,-1..size*size] of int64;
procedure init;
begin
readln(n,m,k); if k+k>n*n then k:=n*n-k;
end;
function min(u,v:int64):int64;
begin
if u>v then exit(v) else exit(u);
end;
function max(u,v:int64):int64;
begin
if u<v then exit(v) else exit(u);
end;
function p(u,v:int64):int64;
var tmp:int64;
begin
if v=0 then exit(1);
tmp:=p(u,v shr 1);
tmp:=tmp*tmp mod mo;
if odd(v) then tmp:=tmp*u mod mo;
exit(tmp);
end;
procedure ready;
begin
c[1,1]:=1; c[1,0]:=1;
for i:=2 to n do
	for j:=0 to i do c[i,j]:=(c[i-1,j]+c[i-1,j-1]) mod mo;
for i:=0 to n do
	for j:=0 to n do
		q[i,j]:=p(c[n,i],(m-j) div n+1);
end;

procedure main;
begin
f[0,0]:=1;

for i:=1 to n do
	for j:=0 to min(k,n*i) do begin
		for t:=max(j-n,0) to j do
			//f[i,j]:=(f[i,j]+f[i-1,t]*p(c[n,j-t],(m-i) div n+1)) mod mo;
		    f[i,j]:=(f[i,j]+f[i-1,t]*q[j-t,i]) mod mo;
		//writeln(i,' ',j,' ',f[i,j]);
		end;
writeln(f[n,k]);
end;
begin
init;
ready;
main;
end.

{$mode objfpc}
uses math;
var
  n,nn,k,i,j: longint;
  m: int64;
  e: array[0..101] of longint;
  c: array[0..101,0..101] of int64;
  f: array[0..101,0..10001] of int64;
  p: array[0..101,0..10001,0..1] of int64;

function pwr(x,n: int64): int64;
begin
  if n=0 then exit(1);
  if n mod 2=0 then exit(sqr(pwr(x,n div 2)) mod 1000000007) else exit(pwr(x,n-1)*x mod 1000000007);
end;

function dp(n,k: longint): int64;
var i: longint;
begin
  if k=0 then exit(1);
  if k>n*nn then exit(0);
  if f[n,k]=-1 then
  begin
    f[n,k]:=0;
    for i:=0 to min(nn,k) do f[n,k]:=(f[n,k]+dp(n-1,k-i)*p[nn,i,e[n]] mod 1000000007) mod 1000000007;
  end;
  exit(f[n,k]);
end;

begin
//  assign(input,'chip.in'); reset(input); assign(output,''); rewrite(output);
  read(n,m,k); fillchar(c,sizeof(c),0); c[0,0]:=1; nn:=n; fillchar(f,sizeof(f),255);
  for i:=1 to n do
  begin
    if i>m mod n then e[i]:=1 else e[i]:=0;
    c[i,0]:=1; p[i,0,0]:=1; p[i,0,1]:=1;
    for j:=1 to n do
    begin
      c[i,j]:=(c[i-1,j-1]+c[i-1,j]) mod 1000000007; p[i,j,0]:=pwr(c[i,j],m div n+1); p[i,j,1]:=pwr(c[i,j],m div n);
    end;
  end;
  writeln(dp(n,k));
//  close(input); close(output);
end.

Program cf_probb;
const md=1000000007;
Var c:array[0..100,0..100] of int64;
    d0,d1:array[0..100] of int64;
    mm:qword;
    i,j,k,l,m,n,low,high:longint;
    f:array[0..100,0..10000] of int64;

function fastmul(base,time:int64):int64;
var ans:int64;
begin
if time=0 then exit(1);
ans:=sqr(fastmul(base,time div 2)) mod md;
if (time mod 2)=0 then exit(ans) else exit((ans*base) mod md);
end;

begin
  readln(n,mm,m);
  c[1,0]:=1;c[1,1]:=1;
  for i:=2 to n do
    begin
    c[i,0]:=1;c[i,i]:=1;
    for j:=1 to i-1 do
      c[i,j]:=(c[i-1,j]+c[i-1,j-1]) mod md;
    end;
  l:=mm mod n; //<=L:D1 >L:D0
  for i:=0 to n do d0[i]:=fastmul(c[n,i],mm div n);
  for i:=0 to n do d1[i]:=fastmul(c[n,i],mm div n+1);
  fillchar(f,sizeof(f),0);
  f[0,0]:=1;
  for i:=1 to n do
    begin
    if m-(n-i)*n>0 then low:=m-(n-i)*n else low:=0;
    if i*n<m then high:=i*n else high:=m;
    for j:=low to high do
      for k:=0 to n do
        if k<=j then
          if f[i-1,j-k]>0 then
          begin
            if i<=l then
            f[i,j]:=(f[i,j]+(f[i-1,j-k]*d1[k]) mod md) mod md
            else
            f[i,j]:=(f[i,j]+(f[i-1,j-k]*d0[k]) mod md) mod md;
          end;
    end;
  writeln(f[n,m]);
end.

program problem2;
uses math;

const d = 1000000007;

function pow( a, p: qWord ): longWord;
var res: qWord;
begin
  res := 1;
  while ( p > 0 ) do
  begin
    if ( odd(p) ) then
      res := ( res * a ) mod d;

    a := ( a * a ) mod d;
    p := p div 2;
  end;

  pow := res;
end;

var n, k, i, j, l: longWord;
    m: qWord;
    dp: array[ 0..100, 0..10000 ] of longWord;
    c: array[ 0..100, 0..100 ] of longWord;
    cPow: array[ 0..100, 0..1 ] of longWord;

begin
  fillchar( c, sizeOf(c), 0 );
  fillchar( dp, sizeOf(dp), 0 );

  readln( n, m, k );

  c[0][0] := 1;
  for i := 1 to n do
  begin
    c[i][0] := 1;
    for j := 1 to i do
      c[i][j] := ( c[i-1][j-1] + c[i-1][j] ) mod d;
  end;

  for i := 0 to n do
  begin
    cPow[i][0] := pow( c[n][i], ( m div n ) );
    cPow[i][1] := ( qWord( cPow[i][0] ) * c[n][i] ) mod d;
  end;

  dp[0][0] := 1;
  for i := 1 to ( m mod n ) do
    for j := 0 to k do
      for l := 0 to min( n, j ) do
        dp[i][j] := ( dp[i][j] + ( qWord(dp[i-1][j-l]) * cPow[l][1] ) ) mod d;
  for i := ( ( m mod n ) + 1 ) to n do
    for j := 0 to k do
      for l := 0 to min( n, j ) do
        dp[i][j] := ( dp[i][j] + ( qWord(dp[i-1][j-l]) * cPow[l][0] ) ) mod d;

  writeln( dp[n][k] );
end.

program Shablon;

{$MODE DELPHI}

uses
  SysUtils, Math;

const
  base = 1000000007;

function sqrr(a, b : int64):int64;
var
  dega : int64;
begin
  if a = 1 then begin
    result := 1;
    exit;
  end;
  dega := a;
  result := 1;
  while b > 0 do begin
    if odd(b) then begin
      result := (result * dega) mod base;
    end;
    dega := (dega * dega) mod base;
    b := b shr 1;
  end;
end;

var
  c  : array[0..100, 0..100] of int64;
  d : array[0..100, 0..10000] of int64;
  kol  : array[0..100] of int64;
  n, m, k, tmp  : int64;
  i, j, t : integer;
begin
  {$IFNDEF ONLINE_JUDGE}
  reset(input, 'input.txt');
  rewrite(output, 'output.txt');
  {$ENDIF}
  read(n, m, k);
  for i := 1 to n do begin
    kol[i] := (m div n);
    c[i][0] := 1;
    c[i][i] := 1;
  end;
  for i := 1 to m mod n do
    kol[i] := (kol[i] + 1);
  for i := 2 to n do
    for j := 1 to n - 1 do
      c[i][j] := (c[i - 1][j - 1] + c[i - 1][j]) mod base;

  d[0][0] := 1;
  for i := 0 to n - 1 do
    for t := 0 to n do begin
      tmp := sqrr(c[n][t], kol[i + 1]);
      for j := 0 to min(k - t, n * i) do begin
          d[i + 1][j + t] := (d[i + 1][j + t] + d[i][j] * tmp) mod base;
      end;
    end;
  write(d[n][k]);

end.

const md = 1000000007;
var n,m,k:int64;
i,j,u:longint;
c:array[0..1000,0..1000]of longint;
calc:array[0..1000]of int64;
cf:array[0..4000]of longint;
pre:array[0..300,0..300]of longint;
dp:array[0..300,0..10001]of longint;
function st(a:longint; n:int64):int64;
var t:int64;
begin
  if n=0 then st:=1
  else
   begin
    if n mod 2=0 then
     begin
      t:=st(a,n div 2);
      t:=t*t mod md;
      st:=t;
     end
    else
      st:=(int64(a)*st(a,n-1)) mod md;
   end;
end;
function mult(a,b:int64):int64;
begin
 a:=a*b;
 a:=a mod md;
end;
 begin
   readln(n,m,k);
   for i:=0 to 1000 do
    begin
     c[0,i]:=0;
     c[i,0]:=1;
    end;
   for i:=1 to 1000 do
    for j:=1 to 1000 do
     c[i,j]:=(c[i-1,j]+c[i-1,j-1]) mod md;
   dp[0,0]:=1;
   for i:=1 to n do
    begin
     calc[i]:=m div n;
     if i<=m mod n then calc[i]:=calc[i]+1;
    end;

   for i:=1 to n do
    begin
     cf[i]:=cf[i-1]+n;
     if cf[i]>k then cf[i]:=k;
    end;
   for i:=0 to n do
    for j:=1 to n do
     pre[i,j]:=st(c[n,i],calc[j]);
   for i:=0 to n-1 do
    for j:=0 to cf[i+1] do
     if dp[i,j]>0 then
      begin
        for u:=0 to n do
          if (j+u>k) then break
          else
           begin
             dp[i+1,j+u]:=dp[i+1,j+u]+mult(dp[i,j],pre[u,i+1]);
             if dp[i+1,j+u]>=md then dp[i+1,j+u]:=dp[i+1,j+u]-md;
           end;
      end;
   writeln(dp[n,k]);
 end.

const base=1000000007;
var n,m,k,chot:int64;
    phanmu:array[1..100]of int64;
    mang:array[0..101,0..10000]of int64;
    tohop,tohopmanh:array[0..100,0..100]of int64;

function power(x,y:int64):int64;
var we,tich:int64;
begin
  if x=0 then power:=0
  else if y=0 then power:=1
  else begin
    we:=power(x,y div 2);
    if y mod 2=0 then tich:=(we*we)mod base
    else begin
      tich:=(we*we)mod base;
      tich:=(tich*x)mod base;
    end;
    power:=tich;
  end;
end;

function min(ax,bx:int64):int64;
begin
  if ax<bx then min:=ax
  else min:=bx;
end;

function tinh(nx,kx:longint):int64;
var tong,tich,we,yu:int64;
    i:longint;
begin
  if mang[nx,kx]=-1 then begin
    if (nx=n+1) then begin
      if kx=0 then tong:=1
      else tong:=0;
    end
    else if kx=0 then tong:=1
    else begin
      tong:=0;
      for i:=0 to (min(n,kx))do begin
        we:=tohopmanh[n,i];
        if nx<=chot then we:=(we*tohop[n,i])mod base;
        yu:=tinh(nx+1,kx-i);
        yu:=(we*yu)mod base;
        tong:=(tong+yu)mod base;
      end;
    end;
    tinh:=tong;
    mang[nx,kx]:=tong;
  end
  else tinh:=mang[nx,kx];
end;

procedure nhap;
var i,j:longint;
    ketqua:int64;
begin
  readln(n,m,k);
  for i:=1 to n+1 do
    for j:=0 to k do mang[i,j]:=-1;
  for i:=0 to 100 do
    for j:=0 to 100 do tohopmanh[i,j]:=power(tohop[i,j],m div n);
  if k>((sqr(n))div 2)then k:=sqr(n)-k;
  chot:=(m mod n);
  ketqua:=tinh(1,k);
  writeln(ketqua);
end;

procedure tinhtohop;
var i,j:longint;
begin
  for i:=0 to 100 do
    for j:=0 to 100 do
      if i<j then tohop[i,j]:=0
      else if (i=j)or(j=0)then tohop[i,j]:=1
      else tohop[i,j]:=(tohop[i-1,j]+tohop[i-1,j-1])mod base;
end;

begin
  tinhtohop;
  nhap;
end.

program tables;
const base=1000000007; maxn=100; maxk=10000;
var
     n,up,i,j,k,o:longint;
     m,tot,t:int64;
     a,b:array[0..maxn] of int64;
     d:array[0..maxn] of longint;
     g:array[0..maxn,0..1] of int64;
     f:array[0..maxn,0..maxk] of int64;

function min(x,y:longint):longint;
begin
     if x<=y then exit(x) else exit(y);
end;

function cal(tmp,y:int64):int64;
var res:int64;
begin
     res:=1;
     while y>0 do
     begin
          if y and 1=1 then res:=res*tmp mod base;
          tmp:=tmp*tmp mod base; y:=y shr 1;
     end;
     cal:=res;
end;

begin
     readln(n,m,up);
     a[0]:=1; b[0]:=1; g[0,0]:=1; g[0,1]:=1;
     tot:=m div n;
     for i:=1 to n do
     begin
          a[i]:=a[i-1]*(n-i+1) mod base;
          b[i]:=b[i-1]*i mod base;
          t:=a[i]*cal(b[i],base-2) mod base;
          d[i]:=ord( (m>n)and(m mod n>=i)  );
          g[i,0]:=cal(t,tot); g[i,1]:=g[i,0]*t mod base;
     end;
     f[0,0]:=1;
     for i:=0 to n-1 do
       for j:=0 to min(i*n,up) do
       if f[i,j]>0 then
       begin
            o:=i+1;
            for k:=0 to min(n,up-j) do
            begin
                 f[o,j+k]:=f[o,j+k]+f[i,j]*g[k,d[o]];
                 if f[o,j+k]>=base then f[o,j+k]:=f[o,j+k] mod base;
            end;
       end;
     writeln(f[n,up]);
end.

{$mode objfpc}
uses math;
const
  fi = '';//'table.in';
  fo = '';//'table.out';
  r = 1000000007;
  maxn = 100;

var
  pthua: integer;
  m,n,k: qword;
  th,f,s1,s2: array[0..maxn,0..maxn*maxn] of qword;

function luythua(i,j: qword):qword;
var tg:int64;
begin
  if j=0 then exit(1);
  if j=1 then exit(i);
  tg:=luythua(i,j div 2);
  tg:=(tg*tg)mod r;
  if j mod 2=1 then tg:=(tg*i)mod r;
  exit(tg);
end;

procedure ktao;
var i,j,t: integer;tich: qword;
begin
  for i:=1 to n do
    begin
      th[i,0]:=1;
      th[i,i]:=1;
      for j:=1 to i-1 do th[i,j]:=(th[i-1,j]+th[i-1,j-1]) mod r;
    end;
  pthua:=m mod n;
  for i:=1 to n do
    for j:=0 to i do
      begin
          s1[i,j]:=luythua(th[i,j],m div n);
          s2[i,j]:=(s1[i,j]*th[i,j]) mod r;
      end;
  fillchar(f,sizeof(f),0);
  f[0,0]:=1;
  for i:=1 to n do
    for j:=0 to k do
      for t:=0 to min(n,j) do if f[i-1,j-t]>0 then
        begin
          if i<=pthua then tich:=s2[n,t] else tich:=s1[n,t];
          f[i,j]:=(f[i,j]+f[i-1,j-t]*tich) mod r;
        end;
end;

begin
  assign(input,fi);reset(input);
  assign(output,fo);rewrite(output);

  readln(n,m,k);
  ktao;
  writeln(f[n,k]);
end.

uses math;
const md=1000000007;

Var n,d,sum,k,i,j:longint;
m:int64;
   f:array[0..101,0..100*101]of int64;
   c,st1,st2:array[0..101,0..101]of int64;
   ost,mult,ans:int64;
function pow(a,b:int64):int64;
  begin
    if b=0 then exit(1);
    if b=1 then exit(a);
    if odd(b) then exit(pow(a,b-1)*a mod md);
    a:=a*a mod md;
    pow:=pow(a,b div 2);
  end;
  begin
    read(n,m,k);
    for i:=1 to n do
      begin
        c[i,0]:=1;
        c[i,i]:=1;
        for j:=1 to i-1 do
          c[i,j]:=(c[i-1,j]+c[i-1,j-1])mod md;
      end;
    ost:=m mod n;
    for i:=1 to n do
      for j:=0 to i do
        begin
          st1[i,j]:=pow(c[i,j],m div n);
          st2[i,j]:=st1[i,j]*c[i,j] mod md;
        end;
    f[0,0]:=1;
    for i:=1 to n do
      for sum:=0 to k do
        for d:=0 to min(sum,n) do
        if f[i-1,sum-d]>0 then
          begin
            if i<=ost then mult:=st2[n,d]
            else mult:=st1[n,d];
            f[i,sum]:=(f[i,sum]+f[i-1,sum-d]*mult) mod md;
          end;
    ans:=0;
    ans:=f[n,k];
    Writeln(ans);
  end.

{$ Q-,R-,S-,I-,O+}
uses math;
var f:array[1..100,0..10000] of int64;
    c:array[-1..100,-1..100] of int64;
    col:array[1..100,0..100] of int64;
     lol,vv,l,i,j,n,k:longint;
     q,pow,base,m:int64;

     function powmod(a,b:int64):int64;
      var tmp:int64;
       begin
        if b=1 then exit(a mod base);
        if b mod 2=0 then exit(sqr(powmod(a,b div 2)) mod base);
        if b mod 2=1 then begin tmp:=powmod(a,b-1); exit((a*tmp) mod base); end;
       end;

      begin
       readln(n,m,k);
       c[0][0]:=1;
       base:=1000000007;
       q:=n;
       for i:=0 to n do for j:=0 to n do if i+j>0 then c[i][j]:=(c[i-1][j-1]+c[i-1][j]) mod base;
       for i:=1 to n do
       for j:=0 to n do
        begin
         pow:=m div q;
         if (i<=m mod q) and (m mod q<>0) then pow:=pow+1;
         col[i][j]:=powmod(c[n][j],pow);
        end;
      if k>n then vv:=n else vv:=k;
      for i:=0 to vv do f[1][i]:=col[1][i];
      for i:=2 to n do
       begin
        lol:=min(i*n,k);
      for j:=0 to lol do
      for l:=0 to vv do if j-l>=0 then
       f[i][j]:=(f[i][j]+(f[i-1][j-l]*col[i][l]) mod base) mod base;
      end;
     writeln(f[n][k]);
    end.

uses math;
const
        nmax    =       101;
        modul   =       1000000007;
var
        n,k:longint;
        m:int64;
        sl:Array[0..nmax] of longint;
        c:Array[0..nmax,0..nmax] of longint;
        f:Array[0..nmax,0..nmax*nmax] of int64;
        d:array[0..nmax,0..nmax] of int64;
procedure nhap;
var i,j,u,v:longint;
begin
        read(n,m,k);
        c[0][0]:=1;
        for i:=1 to n do for j:=0 to i do if (j=0)or(j=i) then c[i][j]:=1
        else c[i][j]:=(c[i-1][j-1]+c[i-1][j])mod modul;
        for i:=1 to n do sl[i]:=(((m-i)div n)+1)mod modul;
end;
function mu(i,j:int64):int64;
var tg:int64;
begin
        if j=0 then exit(1);
        if j=1 then exit(i);
        tg:=mu(i,j div 2);
        tg:=(tg*tg)mod modul;
        if j mod 2=1 then tg:=(tg*i)mod modul;
        exit(tg);
end;
procedure init;
var i,j:longint;
begin
        for i:=1 to n do for j:=0 to n do
          d[i][j]:=mu(c[n][j],sl[i]);
end;
procedure xuly;
var i,j,u,v:longint;
begin
        init;
        f[0][0]:=1;
        for i:=0 to n-1 do for j:=0 to min(n*i,k) do if f[i][j]>0 then
            for u:=0 to min(n,k-j) do
              f[i+1][j+u]:=(f[i+1][j+u]+(f[i][j]*d[i+1][u])mod modul)mod modul;
        writeln(f[n][k]);
end;
begin
        assign(input,'');reset(input);
        assign(output,'');rewrite(output);
          nhap;
          xuly;
        close(input);
        close(output);
end.

var b:array[0..10000] of int64;
var a:array[1..100,0..10000] of int64;
var c,d:array[0..70] of int64;
var i,j,n,k,x,m1,o,l,h:longint;
var m,ans,t,s,p,q:int64;
function mi(x,y:int64):int64;
var d:array[1..70] of int64;
var s,ad:longint;
var mii:int64;
begin
d[1]:=x;
s:=trunc(ln(y)/ln(2))+1;
mii:=1;
for ad:=2 to s do d[ad]:=d[ad-1]*d[ad-1] mod o;
for ad:=1 to s do
begin
if y mod 2=1 then mii:=mii*d[ad] mod o;
y:=y div 2;
end;
mi:=mii;
end;
begin
        readln(n,m,k);
        x:=m-m div n*n;
        o:=1000000007;
        b[0]:=1;
        m1:=trunc(ln(o)/ln(2))+1;
        p:=1;
        q:=1;
        for i:=1 to k do
        begin
                p:=p*(n-i+1) mod o;
                q:=q*i mod o;
                s:=o-2;
                b[i]:=p;
                c[1]:=q;
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then b[i]:=b[i]*c[j] mod o;
                        s:=s div 2;
                end;
        end;
        m1:=trunc(ln(m div n+1)/ln(2))+1;
        ans:=0;
        for l:=0 to k do
        begin
                fillchar(a,sizeof(a),0);
                for i:=0 to l do a[1,i]:=mi(b[i],m div n+1);
                for i:=2 to x do
                for j:=0 to l do
                for h:=0 to j do
                a[i,j]:=(a[i,j]+a[i-1,h]*mi(b[j-h],m div n+1)) mod o;
                for i:=0 to k-l do a[x+1,i]:=mi(b[i],m div n);
                for i:=x+2 to n do
                for j:=0 to k-l do
                for h:=0 to j do
                a[i,j]:=(a[i,j]+a[i-1,h]*mi(b[j-h],m div n)) mod o;
                ans:=(ans+a[x,l]*a[n,k-l]) mod o;
        end;
        write(ans);
end.

var b:array[0..10000] of int64;
var a:array[0..100,0..10000] of int64;
var c,d:array[0..70] of int64;
var i,j,n,k,x,m1,o,l,h:longint;
var m,ans,t,s,p,q:int64;
function mi(x,y:int64):int64;
var d:array[1..70] of int64;
var s,ad:longint;
var mii:int64;
begin
d[1]:=x;
s:=trunc(ln(y)/ln(2))+1;
mii:=1;
for ad:=2 to s do d[ad]:=d[ad-1]*d[ad-1] mod o;
for ad:=1 to s do
begin
if y mod 2=1 then mii:=mii*d[ad] mod o;
y:=y div 2;
end;
mi:=mii;
end;
begin
        readln(n,m,k);
        x:=m-m div n*n;
        o:=1000000007;
        b[0]:=1;
        m1:=trunc(ln(o)/ln(2))+1;
        p:=1;
        q:=1;
        for i:=1 to k do
        begin
                p:=p*(n-i+1) mod o;
                q:=q*i mod o;
                s:=o-2;
                b[i]:=p;
                c[1]:=q;
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then b[i]:=b[i]*c[j] mod o;
                        s:=s div 2;
                end;
        end;
        m1:=trunc(ln(m div n+1)/ln(2))+1;
        ans:=0;
        for l:=0 to k do
        begin
                fillchar(a,sizeof(a),0);
                for i:=0 to l do a[1,i]:=mi(b[i],(m-1) div n+1);
                for i:=2 to x do
                for j:=0 to l do
                for h:=0 to j do
                a[i,j]:=(a[i,j]+a[i-1,h]*mi(b[j-h],m div n+1)) mod o;
                for i:=0 to k-l do a[x+1,i]:=mi(b[i],(m-1) div n);
                for i:=x+2 to n do
                for j:=0 to k-l do
                for h:=0 to j do
                a[i,j]:=(a[i,j]+a[i-1,h]*mi(b[j-h],(m-1) div n)) mod o;
                ans:=(ans+a[x,l]*a[n,k-l]) mod o;
        end;
        write(ans);
end.

var b:array[0..100] of int64;
var a:array[0..100,0..10000] of int64;
var c,d:array[0..100] of int64;
var i,j,n,k,x,m1,o,h:longint;
var m,ans,t,s,p,q:int64;
function mi(x,y:int64):int64;
var d:array[1..70] of int64;
var s,ad:longint;
var mii:int64;
begin
d[1]:=x;
s:=trunc(ln(y)/ln(2))+1;
mii:=1;
for ad:=2 to s do d[ad]:=d[ad-1]*d[ad-1] mod o;
for ad:=1 to s do
begin
if y mod 2=1 then mii:=mii*d[ad] mod o;
y:=y div 2;
end;
mi:=mii;
end;
function max(a,b:int64):int64;
begin
if a>b then exit(a)
else exit(b);
end;
begin

        readln(n,m,k);
        x:=m-m div n*n;
        o:=1000000007;
        b[0]:=1;
        m1:=trunc(ln(o)/ln(2))+1;
        p:=1;
        q:=1;
        for i:=1 to n do
        begin
                p:=p*(n-i+1) mod o;
                q:=q*i mod o;
                s:=o-2;
                b[i]:=p;
                c[1]:=q;
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then b[i]:=b[i]*c[j] mod o;
                        s:=s div 2;
                end;
        end;
        for i:=0 to n do d[i]:=mi(b[i],(m-1) div n);
        for i:=0 to n do c[i]:=d[i]*b[i] mod o;
        fillchar(a,sizeof(a),0);
        for i:=0 to n do a[1,i]:=c[i];
        for i:=2 to x do
        for j:=0 to k do
        for h:=max(j-n,0) to j do
        a[i,j]:=(a[i,j]+a[i-1,h]*c[j-h]) mod o;
        for i:=x+1 to n do
        for j:=0 to k do
        for h:=max(j-n,0) to j do
        a[i,j]:=(a[i,j]+a[i-1,h]*d[j-h]) mod o;
        ans:=a[n,k] mod o;
        if k=0 then ans:=1;
        write(ans);

end.

var a,b:array[0..10000] of int64;
var c,d:array[0..70] of int64;
var i,j,n,k,x,m1,o:longint;
var m,ans,t,s,p,q:int64;
begin

        readln(n,m,k);
        x:=m-m div n*n;
        c[0]:=1;
        d[0]:=1;
        o:=1000000007;
        m1:=trunc(ln(o)/ln(2))+1;
        a[0]:=1;
        b[0]:=1;
        p:=1;
        q:=1;
        for i:=1 to k do
        begin
                p:=p*(x*n-i+1) mod o;
                q:=q*i mod o;
                s:=o-2;
                a[i]:=p;
                c[1]:=q;
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then a[i]:=a[i]*c[j] mod o;
                        s:=s div 2;
                end;
        end;
        p:=1;
        q:=1;
        for i:=1 to k do
        begin
                p:=p*((n-x)*n-i+1) mod o;
                q:=q*i mod o;
                s:=o-2;
                b[i]:=p;
                c[1]:=q;
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then b[i]:=b[i]*c[j] mod o;
                        s:=s div 2;
                end;
        end;
        m1:=trunc(ln(m div n+1)/ln(2))+1;
        for i:=0 to k do
        begin
                t:=1;
                c[1]:=a[i];
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                d[1]:=b[k-i];
                for j:=2 to m1 do d[j]:=d[j-1]*d[j-1] mod o;
                s:=m div n+1;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then t:=t*c[j] mod o;
                        s:=s div 2;
                end;
                s:=m div n;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then t:=t*d[j] mod o;
                        s:=s div 2;
                end;
                ans:=(ans+t) mod o;
        end;
        write(ans);

end.

var a,b:array[0..10000] of int64;
var c,d:array[0..70] of int64;
var i,j,n,k,x,m1,o:longint;
var m,ans,t,s:int64;
begin

        readln(n,m,k);
        x:=m-m div n*n;
        c[0]:=1;
        d[0]:=1;
        o:=1000000007;
        m1:=trunc(ln(m div n+1)/ln(2))+1;
        a[0]:=1;
        b[0]:=1;
        for i:=1 to k do a[i]:=a[i-1]*(x*n-i+1) div i mod o;
        for i:=1 to k do b[i]:=b[i-1]*((n-x)*n-i+1) div i mod o;
        for i:=0 to k do
        begin
                t:=1;
                c[1]:=a[i];
                for j:=2 to m1 do c[j]:=c[j-1]*c[j-1] mod o;
                d[1]:=b[k-i];
                for j:=2 to m1 do d[j]:=d[j-1]*d[j-1] mod o;
                s:=m div n+1;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then t:=t*c[j] mod o;
                        s:=s div 2;
                end;
                s:=m div n;
                for j:=1 to m1 do
                begin
                        if s mod 2=1 then t:=t*d[j] mod o;
                        s:=s div 2;
                end;
                ans:=(ans+t) mod o;
        end;
        write(ans);

end.

uses math;
const module=1000000007;
      debug=false;
var tmp,i,j,n,t,k:longint;
    q,m:int64;
    c:array[0..110,0..110] of int64;
    f:array[0..110,0..10010] of int64;
    p1,p:array[0..11000] of int64;
   function pow(x,n:int64):int64;
    var q,res:int64;
     begin
       q:=x;
       res:=1;
       while n>0 do
        begin
          if n and 1=1 then res:=(res*q) mod module;
          q:=(q*x) mod module;
          n:=n>>1;
        end;
       pow:=res;
     end;
 begin
   read(n,m,k);

   c[0][0]:=1;
   for i:=1 to 100 do
    c[i][0]:=1;

   for i:=1 to 100 do
    for j:=1 to 100 do
     c[i][j]:=(c[i-1][j]+c[i-1][j-1]) mod module;

   if debug then
    begin
      for i:=1 to 5 do
       begin
         for j:=1 to 5 do
          write(c[i][j]:4);
         writeln;
       end;
    end;

   for i:=0 to n do
    p[i]:=pow(c[n][i],m div n);
   for i:=0 to n do
    p1[i]:=pow(c[n][i],m div n+1);

   fillchar(f,sizeof(f),0);
   f[n+1][0]:=1;
   for i:=n downto 1 do
     for j:=0 to k do
      for t:=0 to min(j,n) do
       begin
         inc(tmp);

         if i<=m-n then q:=p1[t]
                   else q:=p[t];

         f[i][j]:=(f[i][j]+f[i+1][j-t]*q) mod module;
       end;
//   writeln(tmp);
   if debug then
    begin
      writeln;

      for i:=1 to n do
       begin
         for j:=1 to k do
          write(f[i][j]:4);
         writeln;
       end;

    end;

   writeln(f[1][k]);
 end.

const md = 1000000007;
var n,m,k:int64;
i,j,u:longint;
c:array[0..1000,0..1000]of longint;
calc:array[0..1000]of int64;
cf:array[0..4000]of longint;
pre:array[0..300,0..300]of longint;
dp:array[0..300,0..1001]of longint;
function st(a:longint; n:int64):int64;
var t:int64;
begin
  if n=0 then st:=1
  else
   begin
    if n mod 2=0 then
     begin
      t:=st(a,n div 2);
      t:=t*t mod md;
      st:=t;
     end
    else
      st:=(int64(a)*st(a,n-1)) mod md;
   end;
end;
function mult(a,b:int64):int64;
begin
 a:=a*b;
 a:=a mod md;
end;
 begin
   readln(n,m,k);
   for i:=0 to 1000 do
    begin
     c[0,i]:=0;
     c[i,0]:=1;
    end;
   for i:=1 to 1000 do
    for j:=1 to 1000 do
     c[i,j]:=(c[i-1,j]+c[i-1,j-1]) mod md;
   dp[0,0]:=1;

   for i:=1 to n do
    begin
     calc[i]:=m div n;
     if i<=m mod n then calc[i]:=calc[i]+1;
    end;

   for i:=1 to n do
    begin
     cf[i]:=cf[i-1]+n;
     if cf[i]>k then cf[i]:=k;
    end;
   for i:=0 to n do
    for j:=1 to n do
     pre[i,j]:=st(c[n,i],calc[j]);
   for i:=0 to n-1 do
    for j:=0 to cf[i+1] do
     if dp[i,j]>0 then
      begin
        for u:=0 to n do
          if (j+u>k) then break
          else
           begin
             dp[i+1,j+u]:=(dp[i+1,j+u]+mult(dp[i,j],pre[u,i+1]));
             if dp[i+1,j+u]>=md then dp[i+1,j+u]:=dp[i+1,j+u]-md;
           end;
      end;
   writeln(dp[n,k]);
 end.

const base=1000000009;
var n,m,k:int64;
    phanmu:array[1..100]of int64;
    mang:array[0..101,0..10000]of int64;
    tohop,tohopmanh:array[0..100,0..100]of int64;

function power(x,y:int64):int64;
var we,tich:int64;
begin
  if x=0 then power:=0
  else if y=0 then power:=1
  else begin
    we:=power(x,y div 2);
    if y mod 2=0 then tich:=(we*we)mod base
    else begin
      tich:=(we*we)mod base;
      tich:=(tich*x)mod base;
    end;
    power:=tich;
  end;
end;

function min(ax,bx:int64):int64;
begin
  if ax<bx then min:=ax
  else min:=bx;
end;

function tinh(nx,kx:longint):int64;
var tong,tich,we,yu:int64;
    i:longint;
begin
  if mang[nx,kx]=-1 then begin
    if (nx=n+1) then begin
      if kx=0 then tong:=1
      else tong:=0;
    end
    else if kx=0 then tong:=1
    else begin
      tong:=0;
      for i:=0 to (min(nx,kx))do begin
        we:=tohopmanh[n,i];
        if nx<=(m mod n)then we:=(we*tohop[n,i])mod base;
        yu:=tinh(nx+1,kx-i);
        yu:=(we*yu)mod base;
        tong:=(tong+yu)mod base;
      end;
    end;
    tinh:=tong;
    mang[nx,kx]:=tong;
  end
  else tinh:=mang[nx,kx];
end;

procedure nhap;
var i,j:longint;
    ketqua:int64;
begin
  readln(n,m,k);
  for i:=1 to n+1 do
    for j:=0 to k do mang[i,j]:=-1;
  for i:=0 to 100 do
    for j:=0 to 100 do tohopmanh[i,j]:=power(tohop[i,j],m div n);
  ketqua:=tinh(1,k);
  writeln(ketqua);
end;

procedure tinhtohop;
var i,j:longint;
begin
  for i:=0 to 100 do
    for j:=0 to 100 do
      if i<j then tohop[i,j]:=0
      else if (i=j)or(j=0)then tohop[i,j]:=1
      else tohop[i,j]:=(tohop[i-1,j]+tohop[i-1,j-1])mod base;
end;

begin
  tinhtohop;
  nhap;
end.

const base=1000000007;
var n,m,k:int64;
    phanmu:array[1..100]of int64;
    mang:array[0..101,0..10000]of int64;
    tohop,tohopmanh:array[0..100,0..100]of int64;

function power(x,y:int64):int64;
var we,tich:int64;
begin
  if x=0 then power:=0
  else if y=0 then power:=1
  else begin
    we:=power(x,y div 2);
    if y mod 2=0 then tich:=(we*we)mod base
    else begin
      tich:=(we*we)mod base;
      tich:=(tich*x)mod base;
    end;
    power:=tich;
  end;
end;

function min(ax,bx:int64):int64;
begin
  if ax<bx then min:=ax
  else min:=bx;
end;

function tinh(nx,kx:longint):int64;
var tong,tich,we,yu:int64;
    i:longint;
begin
  if mang[nx,kx]=-1 then begin
    if (nx=n+1) then begin
      if kx=0 then tong:=1
      else tong:=0;
    end
    else if kx=0 then tong:=1
    else begin
      tong:=0;
      for i:=0 to (min(nx,kx))do begin
        we:=tohopmanh[n,i];
        if nx<=(m mod n)then we:=(we*tohop[n,i])mod base;
        yu:=tinh(nx+1,kx-i);
        yu:=(we*yu)mod base;
        tong:=(tong+yu)mod base;
      end;
    end;
    tinh:=tong;
    mang[nx,kx]:=tong;
  end
  else tinh:=mang[nx,kx];
end;

procedure nhap;
var i,j:longint;
    ketqua:int64;
begin
  readln(n,m,k);
  for i:=1 to n+1 do
    for j:=0 to k do mang[i,j]:=-1;
  for i:=0 to 100 do
    for j:=0 to 100 do tohopmanh[i,j]:=power(tohop[i,j],m div n);
  ketqua:=tinh(1,k);
  writeln(ketqua);
end;

procedure tinhtohop;
var i,j:longint;
begin
  for i:=0 to 100 do
    for j:=0 to 100 do
      if i<j then tohop[i,j]:=0
      else if (i=j)or(j=0)then tohop[i,j]:=1
      else tohop[i,j]:=(tohop[i-1,j]+tohop[i-1,j-1])mod base;
end;

begin
  tinhtohop;
  nhap;
end.

program tables;
const base=1000000007; maxn=100; maxk=10000;
var
     n,up,i,j,k,o:longint;
     m,tot:int64;
     c:array[0..maxn] of int64;
     d:array[0..maxn] of longint;
     g:array[0..maxn,0..1] of int64;
     f:array[0..maxn,0..maxk] of int64;

function min(x,y:longint):longint;
begin
     if x<=y then exit(x) else exit(y);
end;

function cal(tmp,y:int64):int64;
var res:int64;
begin
     res:=1;
     while y>0 do
     begin
          if y and 1=1 then res:=res*tmp mod base;
          tmp:=tmp*tmp mod base; y:=y shr 1;
     end;
     cal:=res;
end;

begin
     readln(n,m,up);
     c[0]:=1; g[0,0]:=1; g[0,1]:=1;
     tot:=m div n;
     for i:=1 to n do
     begin
          c[i]:=c[i-1]*(n-i+1) div i mod base;
          d[i]:=ord( (m>n)and(m mod n>=i)  );
          g[i,0]:=cal(c[i],tot); g[i,1]:=cal(c[i],tot+1);
     end;
     f[0,0]:=1;
     for i:=1 to n do
       for j:=0 to min(i*n,up) do
       begin
            f[i,j]:=0; o:=i-1;
            for k:=0 to min(n,j) do
            if f[o,j-k]>0 then
            begin
                 f[i,j]:=f[i,j]+f[o,j-k]*g[k,d[i]];
                 if f[i,j]>=base then f[i,j]:=f[i,j] mod base;
            end;
       end;
     writeln(f[n,up]);
end.

{$apptype console}
{$maxstacksize 5000000}
{$b-}
const md=1000000007;
var
   p,i,j,n,k:integer;
   st,m:int64;
   a:array[0..101,0..101] of integer;
   b:array[1..101,0..101] of int64;
   dp:array[1..101,0..10001] of int64;

   Function power(v,s:int64):int64;
   var
    qq:int64;
   begin
     if s=0 then power:=1 else if s=1 then power:=v mod md else
     begin
       if s mod 2=0 then
       begin
         qq:=power(v,s div 2);
         power:=qq*qq mod md;
       end else power:=v*power(v,s-1) mod md;
     end;
   end;

begin
 {reset(input,'input.txt');
 rewrite(output,'output.txt'); }
 readln(n,m,k);
 Fillchar(a,sizeof(a),0);
 for i := 0 to n do a[i,0]:=1;
 for i := 1 to n do
   for j := 1 to i do a[i,j]:=(a[i-1,j-1]+a[i-1,j]) mod md;

 Fillchar(b,sizeof(b),0);
 for i := 1 to n do
 begin
    st:=((m-i) div n)+1;
    for j := 0 to n do
     b[i,j]:=power(a[n,j],st);
 end;

 Fillchar(dp,sizeof(dp),0);
 for i := 0 to n do dp[1,i]:=b[1,i];
 for i := 2 to n do
   for j := 0 to k do
   begin
     for p := 0 to n do
       begin
         if (j-p<0) then break;
         dp[i,j]:=(dp[i,j]+dp[i-1,j-p]*b[i,p]);
         while dp[i,j]>1000000000000000000 do dp[i,j]:=dp[i,j]-1000000000000000000;

       end;
       dp[i,j]:=dp[i,j] mod md;
   end;
   writeln(dp[n,k] mod md);
end.

uses math;
const md=1000000007;
var mc,ma,ma1:array[-2..102,-2..102] of int64;
    dp:array[-2..102,-2..10005] of int64;
    i,j,g:longint;
    n,m,k,x,y,t:int64;
function f(a,b:int64):int64;
var p,r:int64;
begin
  if (b=0) or (a=1) then
   begin
     f:=1;
     exit;
   end;
  p:=f(a,b shr 1);
  r:=(p*p) mod md;
  if b and 1=1 then r:=(r*a) mod md;
  f:=r;
end;
begin
  readln(n,m,k);
  mc[0,0]:=1;
  for i:=1 to n do
   for j:=0 to i do
    mc[i,j]:=(mc[i-1,j]+mc[i-1,j-1]) mod md;
  x:=m div n;
  y:=x mod n;
  for j:=0 to i do
   begin
     ma[n,j]:=f(mc[n,j],x);
     ma1[n,j]:=(ma[n,j]*mc[n,j]) mod md;
   end;
  dp[0,0]:=1;
  for i:=1 to n do
   for j:=0 to min(i*n,k) do
    for g:=max(0,j-n) to j do
     begin
       if y<i then t:=ma[n,j-g] else t:=ma1[n,j-g];
       dp[i,j]:=(dp[i,j]+dp[i-1,g]*t) mod md;
     end;
  writeln(dp[n,k]);
end.


var n,k,l,r,m,mn,mx,kol,st,kk:int64;
function step(num,st:int64):int64;
var ans:int64;
begin
  if st=0 then step:=1
  else if st=1 then step:=num
  else
    begin
    ans:=step(num,st div 2);
    ans:=ans*ans;
    if st mod 2 <> 0 then ans:=ans*num;
    step:=ans;
    end;
end;
begin
  read(n,k);
  l:=1;
  r:=n;
  while l+1<r do
    begin
    m:=(l+r)div 2;
    mn:=m;
    mx:=m;
    kk:=0;
    if m mod 2 = 0 then
      begin
      st:=0;
      mx:=m+1;
      end
    else
      st:=-1;
    while mx<=n do
      begin
      inc(st);
      kk:=kk+step(2,st);
      mn:=mn*2;
      mx:=mx*2+1;
      end;
    if mn<=n then
      kk:=kk+n-mn+1;
    if kk>=k then
      l:=m
    else if m+1<=r then
      begin
      inc(m);
      mn:=m;
      mx:=m;
      kk:=0;
      if m mod 2 = 0 then
        begin
        st:=0;
        mx:=m+1;
        end
      else
        st:=-1;
      while mx<=n do
        begin
        inc(st);
        kk:=kk+step(2,st);
        mn:=mn*2;
        mx:=mx*2+1;
        end;
      if mn<=n then
        kk:=kk+n-mn+1;
      if kk>=k then
        l:=m-1
      else
        r:=m-1;
      end
    else r:=m;
    {writeln(m,' ',kk);}
    end;
  m:=l+1;
  mn:=m;
  mx:=m;
  kk:=0;
  if m mod 2 = 0 then
    begin
    st:=0;
    mx:=m+1;
    end
  else
    st:=-1;
  while mx<=n do
    begin
    inc(st);
    kk:=kk+step(2,st);
    mn:=mn*2;
    mx:=mx*2+1;
    end;
  if mn<=n then
     kk:=kk+n-mn+1;
  if kk>=k then
    write(l+1)
  else write(l);
end.

          const eps=1e-14;
         besk=2002000000000000000; label 4,1,3,2,44,22;
         type mas=array[-100..1200000+1] of int64;
        integer=longint;    zap=record  x,y,z:extended; end;
        zap1=^zap;
        var qqq,oldpos,jj,kolvzv,sdvig,start,dl,len,i1,j1,mask,stepp,n2,i,j,k,l,step,k1,mesto,num:longint;
       ss3,ss,ss1,ss2:string;
       pqqq:zap;  bet,al:extended;
       pt,ott1,ott2:zap;
      ver:array[-1..500,-1..5] of extended;
       verugad:array[-2..200,-2..200,-2..200] of extended;
       ot1,ot2,oldgr,predsum,pmin,tmin,pos,aa,bb,kool,sum,number,imin,kolreber,kolstan,qq,kol,chisl,znam,n,m,ttt,numpos,vx,vy,ans,up,down,xmin,xmax,ymin,ymax,imax,t3,qq1,qq2,q1,q2,ost,koll,w,dx,dy,finish,time,p3,p4,qqqq,ii,tt,pmax,pmax2,p1,p2,ot,ott,hh,pos0,pos1,pos2,pp,mm,maxot,tmax,summax,nn,kk,modul,t0,n1,q,t,p:int64; flag1:boolean;
      left,right,pow,znum,z,stan,a2,invx,invy,summ,place,str,b2,z1,sum1,sum0,d0,d1,ccc,c,d,a,b:mas; flag2,flag:boolean;  pl:longint;
      vel,zapas,razn,oldll,oldrr,ppp,shag,posx,posy,minx,miny,maxx,maxy,kolplus,kolminus,razr,jmax,gr,grr,ener,dob,cc,dist,tt3,tt1,tt2,ugg,aa1,aa2,r,ug:int64;
      zzan,prost,marked,zan:array[-1000000..1000000] of boolean;
       zznum,zz,ll,rr,zpl,zmi,path,lx,a3,a4,dd1,dd2,predok,a1,b1,strok:array[-10000..1500000] of int64;
       ppole1,ppole2,ppole:array[-1000000..3000000] of char;
      bufer, str1,str2,stroka:array[-1000..1000000] of char;
     dinam:array[-100000..1000000] of extended;
     t1,t2,al1,bet1,cosa,sina,cosb,sinb,rx,ry,sdvigx,sdvigy,px,py,h1,h2,h,l1,l2,otmax,v:int64;
      dd,ssumitog,profil,zzz:array[-10..2100,-10..2100] of int64;
      sp,sss:array[-10..2000000] of string;
      newpole,pole:array[-1..2100,-1..2700] of char;
      blizpr,ddd,ddinv,dnech,poschet,posnechet:array[-1..29,-1..360000] of int64;
      poss:int64;
      obmen,ch:char;

      ff,flagg1:boolean;
      oldx,oldy,numx,numy,xleft,xright,s,znach,nomer,newplace,newstr,next,prev,xx,yy,aold,x,y:array[-10000..1700002] of int64;
      dp:array[0..3,-1..910,0..12] of int64;
       function srav(i,j:longint):boolean; label 44;
            begin
             if (a[i]<a[j]) then begin srav:=true; goto 44;  end;
            if a[i]>a[j] then begin  srav:=false; goto 44;   end;
             if a[i]=a[j] then if a1[i]>a1[j] then srav:=true else srav:=false;
                 44:
            end;

          procedure sl (k,l,m:integer);  {k- dlina, l,m - nachalo dvuh blokov}
             begin
            i:=l;j:=m; flag:=true; step:=0;while flag do begin
           if (srav(i,j)) then begin begin b[l+step]:=a[i];b1[l+step]:=a1[i];b2[l+step]:=a2[i];end;
            inc(step);inc(i);
            {writeln('step=',step,' i=',i);} end;
           if (not srav(i,j)) then begin begin b[l+step]:=a[j];b1[l+step]:=a1[j];b2[l+step]:=a2[j];end;
           inc(step);inc(j);end;
           if  ((i>=l+k) or (j>=m+k)) then flag:=false;
              end;
               if(i>=l+k) then repeat b[l+step]:=a[j];b1[l+step]:=a1[j];b2[l+step]:=a2[j];inc(step);inc(j);until (j>=m+k);
                if(j>=m+k) then repeat b[l+step]:=a[i];b1[l+step]:=a1[i];b2[l+step]:=a2[i];inc(step);inc(i);until (i>=l+k);
               end;
         procedure sort(var c:mas);
                begin

                   k:=1; repeat
                   l:=1;m:=k+l; repeat sl(k,l,m); l:=l+2*k;m:=m+2*k; until (l>=n); k:=k*2;
                  for i:=1 to n do begin a[i]:=b[i];a1[i]:=b1[i];a2[i]:=b2[i]; end;
                     until (k>=n);

                  end;

         function min (a,b:int64):int64;begin min:=b;if a<b then min:=a;  end;
         function max (a,b:int64):int64;begin max:=b;if a>b then max:=a;  end;

    {   function evkl(a,b:int64):zap1; var d,x,y,r,q,i,j,k,x1,x2,y1,y2:int64;
       tt:zap; tt1:zap1;  fl:boolean;
    begin
       fl:=false;
       if a<b then begin r:=a;a:=b;b:=r; fl:=true; end;
       x2:=1;x1:=0;y2:=0;y1:=1;
       while b>0 do
          begin q:=a div b; r:=a mod b; x:=x2-q*x1;y:=y2-q*y1;
               a:=b;b:=r;x2:=x1;x1:=x;y2:=y1;y1:=y;
          end;
        if not fl then begin d:=a; x:=x2;y:=y2; tt.p1:=d;tt.p2:=x;tt.p3:=y; tt1:=@tt; end else
                 begin d:=a; x:=x2;y:=y2; tt.p1:=d;tt.p2:=y;tt.p3:=x; tt1:=@tt; end;
              evkl:=tt1;
    end;

     }
          function phi(a,b:double):double; label 222;var p:double;
             begin
              if (a>0)and (b>=0) then begin p:=arctan(b/a);goto 222; end;
              if (a<0) then begin p:=pi+arctan(b/a);goto 222; end;
             if (a>0)and (b<0) then begin p:=2*pi+arctan(b/a);goto 222; end;
             if (a=0)and (b>0) then begin p:=pi/2;goto 222; end;
             if (a=0)and (b<0) then begin p:=3*pi/2;goto 222; end;
             222: phi:=p;
            end;

       function nod(a,b:int64):int64; var p,t:int64;
               begin
                 a:=abs(a); b:=abs(b);
                 if (a>0)and(b>0) then
                begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
                      p:=a;
                  end else if a=0 then p:=b else p:=a;
                  nod:=p;
                end;
                          function arccos(tt:extended):extended;
                  begin
                    if abs(tt)>1-1e-13 then
                    if tt>0 then  arccos:=0 else arccos:=pi;
                    if tt=0 then arccos:=pi/2 else
                    if abs(tt)<=1-1e-13 then if tt>=0 then arccos:=arctan(sqrt(1-tt*tt)/tt)
                    else arccos:=pi+arctan(sqrt(1-tt*tt)/tt);

                  end;

          function nok(a,b:int64):int64;
           begin  nok:=(a*b) div nod(a,b);  end;

         function degg(a:int64;k:int64):int64; var p:int64;
              begin
               if k<=0 then degg:=1 else if odd(k) then degg:=(degg(a,k-1)*a) mod modul  else
                 begin  p:=degg(a,k div 2); degg:=(p*p) mod modul;    end;

             end;

         function zaprmax(left,right:longint):int64;
            begin
                  if left>=right then zaprmax:=y[left] else
             begin
              if not odd(left) and odd(right) then zaprmax:=zaprmax(left shr 1,right shr 1) else
                  begin
                  if odd(left) then zaprmax:=max(zaprmax(left+1,right),y[left]);
                  if not odd(right) then zaprmax:=max(zaprmax(left,right-1),y[right]);
                  end;

              end;

             end;

          function zaprmin(left,right:longint):int64;
            begin
            if left>=right then zaprmin:=y[left] else
               begin
             if not odd(left) and odd(right) then zaprmin:=zaprmin(left shr 1,right shr 1) else
                begin
                 if odd(left) then  zaprmin:=min(zaprmin(left+1,right),y[left]);
                 if not odd(right) then zaprmin:=min(zaprmin(left,right-1),y[right]);
                 end;
               end;

                            end;

            procedure udal(ii:longint);
          begin  next[prev[ii]]:=next[ii];prev[next[ii]]:=prev[ii];  end;

       function nomerr(gr:int64):int64;
        var ot,aa,bb,cc:int64; fl:boolean;
             begin
            aa:=1; bb:=p;  cc:=aa; fl:=false;
              while abs(aa-bb)>1 do
                 begin
                   cc:=(aa+bb) shr 1;
                    writeln('cc=++ ',cc);
                  if y[cc]<gr then aa:=cc else bb:=cc;

                 end;
                  writeln(' cc= ',cc);
               {  cc:=max(cc-3,0);
                   }  repeat inc(cc) until y[cc]>=gr;
                      if y[cc]=gr then fl:=true else fl:=false;
                      if fl then nomerr:=a1[cc] else nomerr:=-1000;
                       nomerr:=cc;
             end;

       function pprost(pp:longint):boolean;
        var i,j,t:longint; tt:extended; fl:boolean;
           begin
           tt:=pp;
           tt:=sqrt(tt);
           fl:=true;
           for i:=2 to round(tt) do if pp mod i=0 then  fl:=false;
           pprost:=fl;
           end;

       function gl(c:char):boolean;
              begin
          if (c='a')or (c='o')or(c='e')or(c='i')or(c='u') then gl:=true else gl:=false;
              end;
            function koren(a,b,c,d,t:extended):boolean;
            var ot,p,q:extended;
            begin
              p:=abs(a); if abs(b)>p then p:=abs(b); if abs(c)>p then p:=abs(c); if abs(d)>p then p:=abs(d);
              ot:=a*t*t*t+b*t*t+c*t+d;
              if abs(ot)<eps*p then koren:=true else
            end;

            function mnog(a,b,c,d,t:extended):extended;
            begin  mnog:=a*t*t*t+b*t*t+c*t+d;  end;

            function kor(a,b,c,d,left,right:extended):extended;
            var  p1,p2,ll,rr,mm:extended; k:longint;

            begin
             ll:=left; rr:=right;  k:=0;
             while k<100 do
               begin
                  inc(k);
                  mm:=(ll+rr)/2;
                  if mnog(a,b,c,d,mm)*mnog(a,b,c,d,ll)<=0 then rr:=mm else ll:=mm;

               end;

             kor:=mm;
            end;

   function roots(a,b,c,d:int64):zap1;  label 98,97;
             var disk,l,r,m,left,right,aa,bb,cc:extended;  ans:zap;
            begin
              aa:=3*a;
              bb:=2*b;
              cc:=c;
              disk:=bb*bb-4*aa*cc;
              if disk<0 then begin   goto 98;  end;
              left:=(-bb-sqrt(disk))/(2*aa);
              right:=(-bb+sqrt(disk))/(2*aa);
              if abs(left-right)<eps then begin  ans.x:=left; ans.y:=left;ans.z:=left;  end;
             { writeln('left= ',left:0:25,' right= ',right:0:25);
             } if koren(a,b,c,d,left) then ans.x:=left else
              begin aa:=kor(a,b,c,d,-besk,left);
              writeln('aa= ',aa:0:7);
              if koren(a,b,c,d,aa) then ans.x:=aa;  end;
              aa:=kor(a,b,c,d,left,right);
              writeln('aa= ',aa:0:7);
              if koren(a,b,c,d,aa) then ans.y:=aa;

              aa:=kor(a,b,c,d,right,besk);
              writeln('aa= ',aa:0:7);
              if koren(a,b,c,d,aa) then ans.z:=aa;

            98:
             roots:=@ans;
            end;

 function kolich(gr,chislo:int64):int64;
 label 22;
var i,j:longint; left,right,p,pp,t,tt,ot:int64;
begin
  ot:=0;
 if gr<chislo then goto 22;
 left:=chislo;
 right:=chislo;
 if not odd(chislo) then inc(right);
 repeat
{ writeln('ot= ',ot,' left= ',left,' right=',right);
} ot:=ot+(min(right,gr)-left+1); left:=left*2; right:=right*2+1
 until left>gr;

22:  kolich:=ot;
end;

    begin
     {  assign (input,'D:\Projects\input.txt');reset(input);
       assign (output,'D:\Projects\output.txt'); rewrite(output);
      }

 {  for i:=1 to 20  do writeln(i,' ',kolich(2900,i));

   pos:=1000000;
   repeat dec(pos) until kolich(1000000,pos)>=1000;
   writeln(pos);
}    read(gr,tt);
   aa:=0; bb:=besk;
   while abs(aa-bb)>5 do
     begin
        cc:=(aa+bb) shr 1;
        if odd(cc) then inc(cc);
        if kolich(gr,cc)>=tt then aa:=cc else bb:=cc;

     end;

   { writeln(cc);
   } cc:=cc+20;
    repeat dec(cc) until kolich(gr,cc)>=tt;
    writeln(cc);

        1: close (output);
    end.