using System;
namespace _024_字符读取和编程题
{
class Program
{
static void Main(string[] args)
{
//Convert.ToInt32(Console.ReadLine());
//数字类型 字符串
// a 换行
//char a = (char)Console.Read();
//char b = (char)Console.Read();
//Console.WriteLine("-----------");
//Console.WriteLine(a);
//Console.WriteLine(b);
//char c = (char)Console.Read();
//Console.WriteLine(c);
char c;// '0' -- 55 '9' --
int sum = 0;
do
{
c = (char)Console.Read();
if (c >= '0' && c <= '9')
{
int number = c - '0';
sum += number;
}
} while (c != '@');
Console.WriteLine(sum);
}
}
}