const main = (input) => {
  const N = input.trim().split("");
  if (N.length <= 3) {
    console.log(parseInt(N.join(""), 10));
  } else {
    let answer = "";
    let cnt = 0;

    while (cnt < 3) {
      answer = N.pop() + answer;
      cnt++;
    }

    console.log(parseInt(answer, 10));
  }
};

main(require("fs").readFileSync("/dev/stdin", "utf8"));