Control C101A P37297


Statement
 

pdf   zip

html

Your task is to write a program that reads a natural number and prints the sum of their three last digits.

Input

The input is a natural number n≥100.

Output

The output is a line with the sum of the last three digits of n.

Public test cases
  • Input

    654146
    

    Output

    11
    
  • Input

    666
    

    Output

    18
    
  • Input

    100000000
    

    Output

    0
    
  • Input

    1111111
    

    Output

    3
    
  • Information
    Author
    Professorat de P1
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C C++ Java Python