#!/usr/bin/python from string import digits s = raw_input() res = sum(map(int, filter(lambda e: e in digits, s))) print res