new_contents: # coding: utf-8
  #
  # 結果 https://paiza.jp/poh/joshibato/tsubame/result/e5907390
  #
  
  n_str = input()
  
  n = int(n_str)
  n1 = int(n_str[1:])
  n10 = int(n_str[:1])
  r = n + n1 + n10
  
  print(r)
  
subject: Create answer.py3.py