var
s:string;
m,i,ans:longint;
procedure search(n:longint);
var
i:longint;
begin
if m=1 then exit;
for i:=1 to n div 2 do begin
inc(ans);
search(i);
end;
end;
begin
readln(s);m:=ord(s[1])-48;
ans:=1;
for i:=1 to m div 2 do begin
inc(ans);
search(i);
end;
write(ans);
end.//求解啊!!!