﻿var x: integer;
begin
  read(x);
  repeat
    x += x;
  until x > 1000;
  write(x);
end.