import typing


def main() -> None:
    a, b, c = map(int, input())
    print(111 * (a + b + c))


main()

import typing


def main() -> None:
    a, b, c = map(int, input())
    print(111 * (a + b + c))


main()
