SlepoiKrot

Untitled

Jan 3rd, 2018
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program E;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6.   SysUtils;
  7. var
  8.   n, g: integer;
  9.   m: int64;
  10. begin
  11.   readln (n);
  12.   m := 1;
  13.   while (m <= n) do begin
  14.     m := m * 2;
  15.   end;
  16.   m := m div 2;
  17.   writeln (2 * (n - m) + 1);
  18.   readln;
  19.   readln;
  20. end.
RAW Paste Data