using System; namespace ConsoleApp5 { class Program { static class Ctecka { public static int PrectiCislo() { // preskocit nezajimave znaky: int znak = Console.Read(); while (znak < '0' || znak > '9') znak = Console.Read(); int x = 0; while (znak >='0' && znak <='9') { x = 10 * x + znak - '0'; znak = Console.Read(); } return x; } } static void Main(string[] args) { int soucet = 0; int x = Ctecka.PrectiCislo(); while (x != 0) { soucet += x; Console.WriteLine($"+{x} = {soucet}"); x = Ctecka.PrectiCislo(); } } } }