{
    ACM ICPC 2003-2004 NEERC

    Problem:    Entropy
    Author:     Vladimir Pinaev
    Solution:   Maxim Babenko
}

{$APPTYPE CONSOLE}

const
    inFile = 'entropy.in';
    outFile = 'entropy.out';

    eps = 0.005;
    maxN = 1000;

type
    real = extended;

const
    chars : string = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKMLNOPQRSTUVWXYZ .';

var
    x : real;

function H(s : string) : real;
var
    cnt : array[char] of integer;
    i : integer;
    c : char;

begin
    fillchar(cnt, sizeof(cnt), 0);
    for i := 1 to length(s) do
        inc(cnt[s[i]]);
    result := 0;
    for c := #0 to #255 do
        if cnt[c] <> 0 then
            result := result - cnt[c] / length(s) * ln(cnt[c] / length(s)) / ln(2);
end;

function Calc(x : real) : string;
var
    i, j : integer;

begin
    for j := 0 to maxN do
        for i := 1 to 64 do
            if i + j <= maxN then begin
                result := copy(chars, 1, i) + stringofchar('.', j);
                if abs(H(result) - x) < eps then
                    exit;
            end;

    for i := 1 to 64 do begin
        result := chars + copy(chars, 1, i);
        if abs(H(result) - x) < eps then
            exit;
    end;

    RunError(239);
end;

procedure ReadData;
begin
    reset(input);
    read(x);
    if (x < 0) or (x > 6.00) then
    close(input);
end;

procedure WriteData;
begin
    writeln(Calc(x));
end;

begin
    ReadData;
    WriteData;
end.
