using System;
public class Program
{
public static void Main()
Console.WriteLine("Input numbers separated by + sign");
string splitinput = Console.ReadLine();
string[] i = splitinput.Split('+');
int sum = 0; int N = 0;
foreach (string s in i)
//JH - no need to have this check ... if the array 'i' is empty the foreach will not execute
//if (s.Length > 0)
//{
bool isNum = Int32.TryParse(s, out N);
if (isNum)
// JH - no need to have this second TryParse
//if (Int32.TryParse(s, out N))
sum += N;
//}
}
Console.WriteLine("Sum={0}", sum);
Console.ReadLine();