function Trail(n: Integer): Integer;
var
Mask: Integer;
begin
T := 0;
while (T < SizeOf(Integer)*8) do
begin
Mask := 1 shl T;
if (n and Mask) <> 0 then Exit;
Inc(T);
end;
end;
begin
writeln(Trail(112),' (should be 4)');
end.
function Trail(n: Integer): Integer;
var
Mask: Integer;
begin
T := 0;
while (T < SizeOf(Integer)*8) do
begin
Mask := 1 shl T;
if (n and Mask) <> 0 then Exit;
Inc(T);
end;
end;
begin
writeln(Trail(112),' (should be 4)');
end.