var prime:array[1..1000]of int64;
f:array[1..1000,0..1000]of int64;
n,sum:int64;
function p(x:int64):boolean;
var i:longint;
begin
for i:=1 to sum do
if x mod prime[i]=0 then exit(false);
exit(true);
end;
procedure main;
var i:longint;
begin
for i:=2 to n do
if p(i) then
begin
inc(sum);
prime[sum]:=i;
end;
end;
function solve(step,n:int64):int64;
var pow:int64;
begin
if step>sum then exit(1);
if f[step,n]>=0 then exit(f[step,n]);
solve:=0;
pow:=prime[step];
while pow<=n do
begin
inc(solve,solve(step+1,n-pow));
pow:=pow*prime[step];
end;
inc(solve,solve(step+1,n));
f[step,n]:=solve;
end;
procedure intt;
begin
assign(input,‘game.in‘);
assign(output,‘game.out‘);
reset(input);
rewrite(output);
end;
procedure outt;
begin
close(input);
close(output);
end;
begin
intt;
sum:=0;
readln(n);
fillchar(f,sizeof(f),char(-1));
main;
writeln(solve(1,n));
outt;
end.