// Solution for "Entropy" problem, NEERC'2003
// (C) Roman Elizarov, 2003
{$Q+,R+}
{$APPTYPE CONSOLE}
program ENTROPY_SOLUTION;
uses
  Math;

const
  MAXH = 6;
  DIGITS = 2;
  PREC = 100;
  K = 64;
  EPS = 0.005;
  CH: string[64] = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. ';

var
  n: array[1..K] of integer;
  p, q: array[1..K] of double;
  h: double;
  nn: integer;
  d: double;

procedure rebuild;
var 
  i: integer;
begin
  h := 0;
  d := 1 / nn;
  for i := 1 to K do
    if n[i] <> 0 then begin
      p[i] := n[i] * d;
      q[i] := p[i] * log2(p[i]);
      h := h - q[i];
    end else begin
      p[i] := 0;
      q[i] := 0;
    end;
end;

procedure change(i, j: integer);
begin
  inc(n[j]);
  dec(n[i]);
  p[j] := p[j] + d;
  p[i] := p[i] - d;
  h := h + q[i] + q[j];
  if n[i] <> 0 then
    q[i] := p[i] * log2(p[i])
  else
    q[i] := 0;
  if n[j] <> 0 then
    q[j] := p[j] * log2(p[j])
  else
    q[j] := 0;
  h := h - q[i] - q[j];
end;

procedure next;
var
  i, j: integer;
begin
  for i := 1 to K - 1 do
    if n[i + 1] < n[i] - 1 then begin
      change(i, i + 1);
      exit;
    end else if n[i + 1] = n[i] - 1 then
      for j := i + 1 to K - 1 do
        if n[j + 1] < n[j] then begin
          change(i, j + 1);
          exit;
        end;
  inc(nn);
  n[1] := nn;
  for i := 2 to K do
    n[i] := 0;
  rebuild;
end;

var
  i, j: integer;
  target: double;

begin
  read(target);

  nn := 0;
  for i := 1 to K do 
    n[i] := 0;
  h := 0;
  while true do begin
    next;
    if abs(h - target) < EPS then begin
      for i := 1 to K do
        for j := 1 to n[i] do 
          write(ch[i]);
      break;
    end;
  end;
  Close(output);
end.