output_description: If the earliest ABC where Kurohashi can make his debut is ABC n, print n.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: n = int(input())
  for i in range(n, 1000):
    if i % 111 = 0:
      print(i)
      break
problem_description: Statement
  
  Kurohashi has never participated in AtCoder Beginner Contest (ABC).
  
  The next ABC to be held is ABC N (the N-th ABC ever held). Kurohashi wants to
  make his debut in some ABC x such that all the digits of x in base ten are the
  same.
  
  What is the earliest ABC where Kurohashi can make his debut?
samples: [{"input": "111", "output": "111\n    \n\nThe next ABC to be held is ABC 111, where Kurohashi can make his debut.\n\n* * *"}, {"input": "112", "output": "222\n    \n\nThe next ABC to be held is ABC 112, which means Kurohashi can no longer\nparticipate in ABC 111. Among the ABCs where Kurohashi can make his debut, the\nearliest one is ABC 222.\n\n* * *"}, {"input": "750", "output": "777"}]