#!/usr/bin/env python # -*- coding: utf-8 -*- def solve(): print(sum([int(i) for i in input()])) if __name__=="__main__": solve()