Masha has three sticks of length $$$a$$$, $$$b$$$ and $$$c$$$ centimeters respectively. In one minute Masha can pick one arbitrary stick and increase its length by one centimeter. She is not allowed to break sticks.What is the minimum number of minutes she needs to spend increasing the stick's length in order to be able to assemble a triangle of positive area. Sticks should be used as triangle's sides (one stick for one side) and their endpoints should be located at triangle's vertices.

The only line contains tree integers $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \leq a, b, c \leq 100$$$) — the lengths of sticks Masha possesses.

Print a single integer — the minimum number of minutes that Masha needs to spend in order to be able to make the triangle of positive area from her sticks.

NoteIn the first example, Masha can make a triangle from the sticks without increasing the length of any of them.In the second example, Masha can't make a triangle of positive area from the sticks she has at the beginning, but she can spend one minute to increase the length $$$2$$$ centimeter stick by one and after that form a triangle with sides $$$3$$$, $$$3$$$ and $$$5$$$ centimeters.In the third example, Masha can take $$$33$$$ minutes to increase one of the $$$10$$$ centimeters sticks by $$$33$$$ centimeters, and after that take $$$48$$$ minutes to increase another $$$10$$$ centimeters stick by $$$48$$$ centimeters. This way she can form a triangle with lengths $$$43$$$, $$$58$$$ and $$$100$$$ centimeters in $$$81$$$ minutes. One can show that it is impossible to get a valid triangle faster.

using System;
using System.Linq;

namespace codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] wind = Console.ReadLine().Split().Select(int.Parse).ToArray();
            Array.Sort(wind);
            int rez =(wind[0]+wind[1]+wind[2]+1)/2>wind[2]?0: wind[2] + 1 - wind[0] - wind[1];

            Console.WriteLine(rez);
            //Console.ReadKey();

        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] ss = s.Split(' ');
            int[] arr = new int[3];
            arr[0]=int.Parse(ss[0]); arr[1] = int.Parse(ss[1]); arr[2] = int.Parse(ss[2]);
            Array.Sort(arr);
            int count = 0;
            if (arr[0] + arr[1] <= arr[2])
            {
                count +=1+ arr[2] - (arr[0] + arr[1]);
            }
            Console.WriteLine(count);

        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;

static class UtilityMethods
{
	public static void Swap<T>(ref T a, ref T b)
	{
		T t = a;
		a = b;
		b = t;
	}

	public static int StrToInt(string s)
	{
		int number = 0;
		for (int i = s[0] == '-' ? 1 : 0; i < s.Length; i++)
			number = number * 10 + (s[i] - '0');
		return s[0] == '-' ? -number : number;
	}
	public static long StrToLong(string s)
	{
		long number = 0;
		for (int i = s[0] == '-' ? 1 : 0; i < s.Length; i++)
			number = number * 10 + (s[i] - '0');
		return s[0] == '-' ? -number : number;
	}

	public static string ReadString() => Console.ReadLine();
	public static int ReadInt() => StrToInt(ReadString());
	public static long ReadLong() => StrToLong(ReadString());
	public static double ReadDouble() => double.Parse(ReadString());

	public static string[] ReadStringArray() => ReadString().Split();
	public static int[] ReadIntArray() => Array.ConvertAll(ReadStringArray(), StrToInt);
	public static long[] ReadLongArray() => Array.ConvertAll(ReadStringArray(), StrToLong);
	public static double[] ReadDoubleArray() => ReadStringArray().Select(double.Parse).ToArray();

	public static void WriteLine(object a) => Console.WriteLine(a);
	public static void WriteLineArray<T>(string separator, T[] a, int startIndex, int count)
	{
		const int MAXLEN = 1000000;
		int len = 0, j = startIndex, lastIndex = startIndex + count;
		System.Text.StringBuilder str;
		string[] b = Array.ConvertAll(a, x => x.ToString());
		for (int i = startIndex; i < lastIndex - 1; i++)
		{
			len += b[i].Length + separator.Length;
			if (len >= MAXLEN)
			{
				str = new System.Text.StringBuilder(len);
				for (; j <= i; j++)
				{
					str.Append(b[j]);
					str.Append(separator);
				}
				Console.Write(str);
				len = 0;
			}
		}
		str = new System.Text.StringBuilder(len);
		for (; j < lastIndex - 1; j++)
		{
			str.Append(b[j]);
			str.Append(separator);
		}
		Console.Write(str);
		Console.WriteLine(b.Last());
	}
}

class Program
{
	static void Main()
	{
		int[] data = UtilityMethods.ReadIntArray();
		Array.Sort(data);
		int a = data[0], b = data[1], c = data[2];
		UtilityMethods.WriteLine(Math.Max(0, c - a - b + 1));
		Console.ReadLine();
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Codefoeces
{
    class Program
    {

        static void Main(string[] args)
        {

            string[] s =  Console.ReadLine().Split();
            int[] mas = new int[3];
            mas[0] = int.Parse(s[0]);
            mas[1] = int.Parse(s[1]);
            mas[2] = int.Parse(s[2]);
            int count = 0;
            Array.Sort(mas);
            while (mas[0] + mas[1] <= mas[2])
            {
                mas[0]++;
                count++;
            }

            Console.WriteLine(count);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var data = Console.ReadLine().Split();
            int a = int.Parse(data[0]);
            int b = int.Parse(data[1]);
            int c = int.Parse(data[2]);

            int res = 0;
            while (a >= b + c)
            {
                ++b;
                ++res;
            }

            while (b >= a + c)
            {
                ++a;
                ++res;
            }
            while (c >= a + b)
            {
                ++a;
                ++res;

            }
            Console.WriteLine(res);
            //Console.ReadKey();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleProject
{
    class Program
    {
        static int ReadInt() => int.Parse(Console.ReadLine());
        static string ReadString() => Console.ReadLine();
        static int[] ReadIntArray() => (Console.ReadLine().Split(' ')).Select(int.Parse).ToArray();
        static double[] ReadDoubleArray() => (Console.ReadLine().Split(' ')).Select(double.Parse).ToArray();
        static long[] ReadLongArray() => (Console.ReadLine().Split(' ')).Select(long.Parse).ToArray();
        static List<int> ReadIntList() => (Console.ReadLine().Split(' ')).Select(int.Parse).ToList();
        static List<long> ReadLongList() => (Console.ReadLine().Split(' ')).Select(long.Parse).ToList();
        static char[] ReadCharArray() => (Console.ReadLine().Split(' ')).Select(char.Parse).ToArray();
        struct Point
        {
            public string s;
            public int i;
            public Point(int i, string s)
            {
                this.i = i;
                this.s = s;
            }
        }
        static void Main()
        {
            int ans = 0;
            int[] a = ReadIntArray();
            Array.Sort(a);
            if (a[2] >= a[1] + a[0])
            {
                int s = a[2] - (a[1] + a[0]);
                ans += s + 1;
            }
            Console.WriteLine(ans);
            Console.ReadLine();
        }

        private static long S(long v)
        {
            long sum = 0;
            while (v != 0)
            {
                sum += v % 10;
                v /= 10;
            }
            return sum;
        }
        private static long F(long v)
        {
            long sum = 0;
            while (v >= 10)
            {
                v /= 10;
                sum *= 10;
                sum += 9;
            }
            return sum;
        }
    }
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Numerics;

namespace cf516
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.SetIn(new StreamReader("input.txt"));
            solve_cf516A();
        }

        public static void solve_cf516A()
        {
            int[] abc = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);

            int a = abc[0];
            int b = abc[1];
            int c = abc[2];

            int ab = a + b;
            int bc = b + c;
            int ac = a + c;

            int diff = 0;
            if (ab <= c)
            {
                diff = c - ab + 1;
            }

            if (bc <= a)
            {
                diff = a - bc + 1;
            }

            if (ac <= b)
            {
                diff = b - ac + 1;
            }

            Console.WriteLine(diff);

        }

    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Numerics;

class Program
{
    public static void Main(string[] args)
    {
        //MulticaseTest();
        int[] input = Console.ReadLine().Split().Select(int.Parse).OrderByDescending(x=>x).ToArray();
        int a = input[0], b = input[1], c = input[2];
        if (b + c > a) Console.WriteLine(0);
        else Console.WriteLine((a - (b+c))+1);
    }

    public static void MulticaseTest()
    {
        //4
        //4 5 2 3
        int t = int.Parse(Console.ReadLine());
        List<string> o = new List<string>(t);
        for (int i = 0; i < t; i++)
        {
            int n = int.Parse(Console.ReadLine());
        }
        o.ForEach(Console.WriteLine);
    }

}

using System;
using System.Linq;

namespace CSharp
{
    public class _1064A
    {
        public static void Main()
        {
            int[] abc = Console.ReadLine().Split().Select(token => int.Parse(token)).ToArray();
            Console.WriteLine(Math.Max(0, 2 * abc.Max() + 1 - abc.Sum()));
        }
    }
}

using System;
using System.Text;

public class Program
{
    public void Solve()
    {
        var sc = new Scanner();
        int a = sc.NextInt();
        int b = sc.NextInt();
        int c = sc.NextInt();

        int max = Math.Max(a, Math.Max(b, c));
        int others = a + b + c - max;

        if (others > max)
        {
            Console.WriteLine(0);
        }
        else
        {
            Console.WriteLine(max-others + 1);
        }
    }

    public static void Main(string[] args)
    {
        new Program().Solve();
    }
}

class Scanner
{
    public Scanner()
    {
        _pos = 0;
        _line = new string[0];
    }

    const char Separator = ' ';
    private int _pos;
    private string[] _line;

    #region スペース区切りで取得

    public string Next()
    {
        if (_pos >= _line.Length)
        {
            _line = Console.ReadLine().Split(Separator);
            _pos = 0;
        }

        return _line[_pos++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }

    #endregion

    #region 型変換

    private int[] ToIntArray(string[] array)
    {
        var result = new int[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = int.Parse(array[i]);
        }

        return result;
    }

    private long[] ToLongArray(string[] array)
    {
        var result = new long[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = long.Parse(array[i]);
        }

        return result;
    }

    private double[] ToDoubleArray(string[] array)
    {
        var result = new double[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = double.Parse(array[i]);
        }

        return result;
    }

    #endregion

    #region 配列取得

    public string[] Array()
    {
        if (_pos >= _line.Length)
            _line = Console.ReadLine().Split(Separator);

        _pos = _line.Length;
        return _line;
    }

    public int[] IntArray()
    {
        return ToIntArray(Array());
    }

    public long[] LongArray()
    {
        return ToLongArray(Array());
    }

    public double[] DoubleArray()
    {
        return ToDoubleArray(Array());
    }

    #endregion
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Solution
{
    class Program
    {
        static void Main(string[] args)
        {
            var ABC = Console.ReadLine().Split().Select(x=>int.Parse(x)).ToList();
            var A = ABC[0];
            var B = ABC[1];
            var C = ABC[2];
            var sum = 0;
            while (A+B <= C || A+C <= B || B+C <= A)
            {
                if (A == Math.Min(A, Math.Min(B, C)))
                {
                    A++; sum++;
                }
                else if (B == Math.Min(A, Math.Min(B, C)))
                {
                    B++; sum++;
                }
                else
                {
                    C++; sum++;
                }
            }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;

namespace G6
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] p = ParseToArray(Console.ReadLine(), 3);
            Array.Sort(p);
            Console.Write(Math.Max(0, p[2] - (p[0] + p[1]) + 1));

            //Console.ReadKey();
        }

        static int[] ParseToArray(string S, int LengOfS)
        {
            int[] p = new int[10] { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 };
            int[] r = new int[LengOfS];
            S = " " + S.Trim(' ');
            int i = LengOfS - 1; int pw = 0;
            for (int c = S.Length - 1; c >= 0; c--)
                if (S[c] == 45)
                {
                    r[i] *= (int)-1;
                }
                else if (S[c] != 32)
                {
                    r[i] += (int)((S[c] - 48) * p[pw]);
                    pw++;
                }
                else
                {
                    pw = 0;
                    i--;
                }
            return r;
        }
    }
}

using System;
using System.Collections.Generic;

public class Program
{
    static void Main(string[] args)
    {
        string[] inp = Console.ReadLine().Split(' ');
        int[] s = new int[3];
        for (int i = 0; i < 3; i++)
        {
            s[i] = int.Parse(inp[i]);
        }
        Array.Sort(s);
        int x = s[2] - s[1];
        int y = Math.Max(0, s[2] - s[1] - s[0] + 1);
        Console.WriteLine(Math.Min(x, y));
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> arr = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToList();

            arr.Sort();

            Console.WriteLine((arr[0] + arr[1]) > arr[2] ? "0" : $"{arr[2] - Math.Abs(arr[0] + arr[1]) + 1}");

            //Console.WriteLine($"{arr[2] - Math.Abs(arr[0] + arr[1]) + ((arr[0] + arr[1]) > arr[2] ? 1 : 0)}");
        }
    }
}

using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;

namespace codeforces
{

    public class Program
    {

        private static void Main(string[] args)
        {
            var values = Console.ReadLine().Split(' ');
            var a = new int[3] { Convert.ToInt32(values[0]), Convert.ToInt32(values[1]), Convert.ToInt32(values[2]) };
            Array.Sort(a, 0, 3);
            Console.WriteLine(a[2] >= a[0] + a[1] ? a[2] - a[0] - a[1] + 1 : 0);

        }
    }
}

using System;

namespace _1064A
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int index = str.IndexOf(' ');
            int a = Convert.ToInt32(str.Substring(0, index));
            str = str.Substring(index + 1);
            index = str.IndexOf(' ');
            int b = Convert.ToInt32(str.Substring(0, index));
            int c = Convert.ToInt32(str.Substring(index));
            int time = 0;
            int[] side = new int[3];
            side[0] = a;
            side[1] = b;
            side[2] = c;

            side = sortArray(side);

            if (a + b > c && a + c > b && b + c > a)
            {
                time = 0;
            }
            else
            {
                while (side[0] + side[1] <= side[2])
                {
                    side[0]++;
                    time++;
                }
            }

            Console.WriteLine(time);

        }

        static int[] sortArray(int[] array)
        {
            int temp;

            for (int i = 0; i < array.Length - 1; i++)
            {
                for (int j = i + 1; j < array.Length; j++)
                {
                    if (array[i] > array[j])
                    {
                        temp = array[i];
                        array[i] = array[j];
                        array[j] = temp;
                    }
                }
            }

            return array;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class A1064_MakeATriangle
    {
        public static void Main()
        {
            string[] a = Console.ReadLine().Split(' ');
            int x = int.Parse(a[0]);
            int y = int.Parse(a[1]);
            int z = int.Parse(a[2]);
            int big = int.MinValue;
            int sm1 = int.MinValue;
            int sm2 = int.MinValue;
            bool Isosceler = false;

            if (x > y)
            {
                if (x > z)
                {
                    big = x;
                    if (z > y)
                    {
                        sm1 = z;
                        sm2 = y;
                    }
                    else /*if(y>z)*/
                    {
                        sm1 = y;
                        sm2 = z;
                    }
                    //else
                    //{

                    //}
                    //    Isosceler = true;
                }
                else //if (z > x)
                {
                    big = z;
                    sm1 = x;
                    sm2 = y;
                }
                //else
                //    Isosceler = true;
            }
            else /*if (y > x)*/
            {
                if (y > z)
                {
                    big = y;
                    if (z > x)
                    {
                        sm1 = z;
                        sm2 = x;
                    }
                    else //if(z<x)
                    {
                        sm1 = x;
                        sm2 = z;
                    }
                    //else
                    //    Isosceler = true;
                }
                else if (z > y)
                {
                    big = z;
                    sm1 = y;
                    sm2 = x;
                }
                //else
                //    Isosceler = true;
            }
            //else
            //    Isosceler = true;

            if(/*Isosceler ||*/ big<sm1+sm2)
                Console.WriteLine(0);
            else if(big>=(sm2+sm1))
                Console.WriteLine(big-(sm2+sm1)+1);
        }

    }
}

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test
{
    class IOHelper : IDisposable
    {
        StreamReader reader;
        StreamWriter writer;

        public IOHelper(string inputFile, string outputFile, Encoding encoding)
        {
            StreamReader iReader;
            StreamWriter oWriter;
            if (inputFile == null)
                iReader = new StreamReader(Console.OpenStandardInput(), encoding);
            else
                iReader = new StreamReader(inputFile, encoding);

            if (outputFile == null)
                oWriter = new StreamWriter(Console.OpenStandardOutput(), encoding);
            else
                oWriter = new StreamWriter(outputFile, false, encoding);

            reader = iReader;
            writer = oWriter;

            curLine = new string[] { };
            curTokenIdx = 0;
        }

        string[] curLine;
        int curTokenIdx;

        char[] whiteSpaces = new char[] { ' ', '\t', '\r', '\n' };

        public string ReadNextToken()
        {
            if (curTokenIdx >= curLine.Length)
            {
                //Read next line
                string line = reader.ReadLine();
                if (line != null)
                    curLine = line.Split(whiteSpaces, StringSplitOptions.RemoveEmptyEntries);
                else
                    curLine = new string[] { };
                curTokenIdx = 0;
            }

            if (curTokenIdx >= curLine.Length)
                return null;

            return curLine[curTokenIdx++];
        }

        public int ReadNextInt()
        {
            return int.Parse(ReadNextToken());
        }

        public double ReadNextDouble()
        {
            var nextToken = ReadNextToken();
            var result = 0.0;
            nextToken = nextToken.Replace(".", System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator);
            result = double.Parse(nextToken);
            return result;
        }

        public void Write(string stringToWrite)
        {
            writer.Write(stringToWrite);
        }

        public void WriteLine(string stringToWrite)
        {
            writer.WriteLine(stringToWrite);
        }

        public void WriteLine(double valueToWrite)
        {
            long intPart = (long)valueToWrite;
            double fracPart = valueToWrite - intPart;
            var fracPartStr = fracPart.ToString();
            if (fracPartStr.Length > 1)
                fracPartStr = fracPartStr.Substring(2);
            var strToWrite = string.Format("{0}.{1}", intPart, fracPartStr);
            writer.WriteLine(strToWrite);
        }

        public void Dispose()
        {
            try
            {
                if (reader != null)
                {
                    reader.Dispose();
                }
                if (writer != null)
                {
                    writer.Dispose();
                }
            }
            catch { };
        }

        public void Flush()
        {
            if (writer != null)
            {
                writer.Flush();
            }
        }
    }

    class Program
    {
        protected IOHelper ioHelper;

        int a, b, c;

        public void Solve()
        {
            a = ioHelper.ReadNextInt();
            b = ioHelper.ReadNextInt();
            c = ioHelper.ReadNextInt();

            List<int> nums = new List<int>();
            nums.Add(a);
            nums.Add(b);
            nums.Add(c);
            nums.Sort();

            int mid = nums[1];
            int sum = nums[0] + nums[1];
            int max = nums[2];

            int res = 0;

            if (sum <= max)
                res = max + 1 - sum;

            ioHelper.WriteLine(res.ToString());
            ioHelper.Flush();

            //Console.ReadKey();
        }

        public Program(string inputFile, string outputFile)
        {
            ioHelper = new IOHelper(inputFile, outputFile, Encoding.Default);
            Solve();
            ioHelper.Dispose();
        }

        static void Main(string[] args)
        {
            Program myProgram = new Program(null, null);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
class Solution
{
    static void Main(string[] args)
    {
        int[] a = Array.ConvertAll(ReadLine().Split(), int.Parse);
        Array.Sort(a);
        WriteLine(Math.Max(0,a[2]+1-a[1]-a[0]));

    }
}

using System;
using System.Collections.Generic;
class Program
{
	static void Main(string[] args)
	{
		string[] str = Console.ReadLine().Split();
		int[] A = new int[3];
		A[0] = int.Parse(str[0]);
		A[1] = int.Parse(str[1]);
		A[2] = int.Parse(str[2]);
		Array.Sort(A);
		long ans = 0;
		if(A[0] + A[1] <= A[2]){
			ans = A[2] - (A[0]+A[1]) + 1;
		}
		Console.WriteLine(ans);
	}
}

using System.Linq;
using System.Collections.Generic;
using System;

namespace MyApp
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 0, b = 0, c = 0;
            var inp = Console.ReadLine().Split();
            a = Convert.ToInt32(inp[0]);
            b = Convert.ToInt32(inp[1]);
            c = Convert.ToInt32(inp[2]);
            if(a > c) {
              int temp = c;
              c = a;
              a = temp;
            }
            if(b > c) {
              int temp = c;
              c = b;
              b = temp;
            }
            int ans = 0;
            if(c - (a + b - 1) > ans) {
              ans = c - (a + b - 1);
            }
            Console.WriteLine(ans);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Text.RegularExpressions;

namespace ProjectEuler
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();

            string[] tmp = str.Split(' ');
            int a = Convert.ToInt32(tmp[0]);
            int b = Convert.ToInt32(tmp[1]);
            int c = Convert.ToInt32(tmp[2]);

            if(a + b <= c){
                Console.WriteLine(c - a - b + 1);

            }else if(a + c <= b){
                Console.WriteLine(b - a - c + 1);
            }else if (b + c <= a){
                Console.WriteLine(a - b - c + 1);
            }else{
                Console.WriteLine(0);
            }
        }
    }
}

using System;
using System.Linq;

namespace Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            var lengths = Console.ReadLine().Split(' ').Select(int.Parse).ToList();

            Console.WriteLine(TriangleTime(lengths[0], lengths[1], lengths[2]));
        }

        private static int TriangleTime(int a, int b, int c)
        {
            var difa = a + b - c;
            var difb = a + c - b;
            var difc = b + c - a;

            if (difa > 0 && difb > 0 && difc > 0)
            {
                return 0;
            }

            int[] arr = { difa, difb, difc };
            return 1 - arr.Min();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codefores1410A
{
    class Program
    {
        static void Main(string[] args)
        {

            string read;
            read = Console.ReadLine();
            int a = int.Parse(read.Split(' ').ToList()[0]);
            int b = int.Parse(read.Split(' ').ToList()[1]);
            int c = int.Parse(read.Split(' ').ToList()[2]);

            int max = 0;
            int other = 0;

            if (a >= b && a >= c)
            {
                max = a;
                other = b + c;
            }

            else if (b >= a && b >= c)
            {
                max = b;
                other = a + c;
            }

            else
            {
                max = c;
                other = b + a;
            }

            int output = max - other;

            if(output < 0)
            {
                Console.WriteLine(0);
            }
            else
            {
                Console.WriteLine(output + 1);
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetExperiment
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] abc = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            double p = abc[0] + abc[1] + abc[2];
            int c = 0;
            while ((p / 2 - abc[0]) <= 0 || (p / 2 - abc[1]) <= 0 || (p / 2 - abc[2]) <= 0)
            {
                p++;
                c++;
            }
            Console.WriteLine(c);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[]y=Console.ReadLine().Split(' ');
            int[]a=new int[3];
            a[0]=int.Parse(y[0]);
            a[1]=int.Parse(y[1]);
            a[2]=int.Parse(y[2]);
            Array.Sort(a);
            int outp=a[2]-(a[0]+a[1])+1;
            if(outp<0)
            outp=0;
            Console.WriteLine(outp);
        }
    }
}

using System;

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            {
                string[] str = Console.ReadLine().Split();
                int[] m = new int[3];
                m[0] = Convert.ToInt32(str[0]);
                m[1] = Convert.ToInt32(str[1]);
                m[2] = Convert.ToInt32(str[2]);
                Array.Sort(m);
                Console.WriteLine(Math.Max(0, m[2] - m[1] - m[0] + 1));
            }
        }
    }
}

using System;
using System.IO;
using System.Text;

namespace Make_a_triangle
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            writer.WriteLine(Solve(args));
            writer.Flush();
        }

        private static int Solve(string[] args)
        {
            int a = Next(), b = Next(), c = Next();

            int m = Math.Max(a, Math.Max(b, c));
            int d = a + b + c - m;
            return Math.Max(0, m + 1 - d);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int t;
            t = 0;
            int[] abc = new int[3];
            string [] s = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            int length = s.Length;
            for (int i = 0; i < length; i++)
            {
                abc[i] = int.Parse(s[i]);
            }
            if (abc[0] >= abc[1]+abc[2])
            {
                t = abc[0] - abc[1] - abc[2] + 1;
            }
            if (abc[1] >= abc[0] + abc[2])
            {
                t = abc[1] - abc[0] - abc[2] + 1;
            }
            if(abc[2] >= abc[1] + abc[0])
            {
                t = abc[2] - abc[1] - abc[0] + 1;
            }
            Console.WriteLine(t);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A
{
	class Program
	{
		static void Main(string[] args)
		{
			int[] m = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
			int a, b, c;
			if ((m[0] >= m[1]) && (m[0] > m[2])) { a = m[0]; b = m[1]; c = m[2]; }
			else if (m[1] >= m[2]) { a = m[1]; b = m[0]; c = m[2]; }
			else { a = m[2]; b = m[0]; c = m[1]; }
			if (a < (b+c))
			{
				Console.WriteLine("0");
			}
			else
			{
				Console.WriteLine((a + 1) - (b + c));
			}
		}
	}
}

using System;

public static class TriangleSolution
{
	public static string Numbers = Console.ReadLine();
	public static int Length = Numbers.Length;
	public static int CurrentSide = 1;
	public static string[] separateNumbers = new string[3];
	public static int[] integerNumbers = new int[3];
	public static int numberOfMinutes = 1;
	public static int shortestSide1;
	public static int shortestSide2;
	public static int longestSide;
	public static void getSideLengths()
	{
		char letter = '0';
		for(int i = 0; i < Length; i++)
		{
			letter = Numbers[i];
			if(letter == ' ')
			{
				CurrentSide = CurrentSide + 1;

			}
			else
			{

				separateNumbers[CurrentSide - 1] = separateNumbers[CurrentSide - 1] + letter + "";

			}
		}
	}
	public static void convertArrayToInteger(string[] chosenArray, int[] targetArray)
	{
		for(int i = 0; i < chosenArray.Length; i++)
		{
			targetArray[i] = int.Parse(chosenArray[i]);
		}
	}
	public static void declareSides(int sideShorter, int sideShorter2, int sideLonger)
	{
		shortestSide1 = sideShorter;
		shortestSide2 = sideShorter2;
		longestSide = sideLonger;
	}
	public static void orderSides(int[] integerSideLengths)
	{
			if(integerSideLengths[0] > integerSideLengths[1])
			{
				if(integerSideLengths[0] > integerSideLengths[2])
				{
					if(integerSideLengths[1] > integerSideLengths[2])
						declareSides(integerSideLengths[2],integerSideLengths[1],integerSideLengths[0]);
					else declareSides(integerSideLengths[1],integerSideLengths[2],integerSideLengths[0]);
				}
				else
				{
					declareSides(integerSideLengths[1],integerSideLengths[0],integerSideLengths[2]);
				}
			}
			else if (integerSideLengths[0] > integerSideLengths[2])
				declareSides(integerSideLengths[2],integerSideLengths[0],integerSideLengths[1]);
			else
			{
				if (integerSideLengths[1] < integerSideLengths[2])
				{
					declareSides(integerSideLengths[0],integerSideLengths[1],integerSideLengths[2]);
				}
				else declareSides(integerSideLengths[0],integerSideLengths[2],integerSideLengths[1]);
			}
	}
	public static void Main()
	{
		getSideLengths();
		convertArrayToInteger(separateNumbers, integerNumbers);
		//Console.WriteLine(separateNumbers[2]);
		orderSides(integerNumbers);
		//Console.WriteLine(integerNumbers[2]);
		//Console.WriteLine(longestSide + "" + shortestSide1 + "" + shortestSide2);
		numberOfMinutes = (longestSide - shortestSide1) - shortestSide2;
		if(numberOfMinutes < 0)
		{
			numberOfMinutes = 0;
		}
		else numberOfMinutes++;
		/*Console.WriteLine(Numbers);
		Console.WriteLine(separateNumbers[1]);
		Console.WriteLine(integerNumbers[1]);
		Console.WriteLine(longestSide + " " + shortestSide1);*/
		Console.WriteLine(numberOfMinutes);
	}

}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){

		Array.Sort(A);
		Console.WriteLine(Math.Max(0, A[2] - (A[1] + A[0]) + 1));

	}
	int[] A;
	public Sol(){
		A = ria();
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}

/*
csc -debug A.cs && mono --debug A.exe <<< "
*/

using System;
using System.Collections.Generic;
using System.Linq;

public class HelloWorld {
    static public void Main () {
        SolveCodeForces();
    }

    public static void SolveCodeForces() {
        var abc = Console.ReadLine().Split().Select(long.Parse).ToArray();
        var a = abc[0];
        var b = abc[1];
        var c = abc[2];
        var x = GrowFirst(a, b + c);
        var y = GrowFirst(b, a + c);
        var z = GrowFirst(c, a + b);
        System.Console.WriteLine(Math.Max(x, Math.Max(y, z)));
    }

    private static long GrowFirst(long a, long sum) {
        if (a < sum)
            return 0L;
        return a - sum + 1;
    }
}

public static class Helpers {
    public static T[] CreateArray<T>(int length, Func<int, T> itemCreate) {
        var result = new T[length];
        for (var i = 0; i < result.Length; i++)
            result[i] = itemCreate(i);
        return result;
    }

    public static T ElementWithMax<T>(this IEnumerable<T> seq, Func<T, long> func) {
        var bi = default(T);
        var bv = long.MinValue;
        foreach (var item in seq) {
            var v = func(item);
            if (v > bv) {
                bi = item;
                bv = v;
            }
        }
        return bi;
    }
}

using System;

class Program
{
    static void Main()
    {
        int[] input = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);

        Array.Sort(input);
        int result = input[0] + input[1] > input[2] ? 0 : input[2] - (input[0] + input[1]) + 1;

        Console.WriteLine(result);
    }
}

using System;
using System.Linq;

namespace algorithms_700_01
{
    class Program
    {
        static void Main()
        {
            var vertices = Console.ReadLine().Split(new char[] { ' ' }).Select(x => int.Parse(x));
            var max = vertices.OrderBy(x => x).LastOrDefault();
            var otherVerticesSum = vertices.Aggregate(0, (sum, x) => sum + x) - max;
            Console.WriteLine((otherVerticesSum > max) ? "0" : "" + (max - otherVerticesSum + 1));
        }
    }
}

using System;

namespace round516
{
  class MainClass
  {
    static int need(int a, int b)
    {
      if (a < b) return 0;
      return a - b + 1;
    }

    public static void Main(string[] args)
    {
      var line = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
      int a = line[0];
      int b = line[1];
      int c = line[2];

      int result = 0;
      if (a > b)
      {
        if (a > c)
        { // A
          result = need(a, b + c);
        }
        else
        { // C
          result = need(c, a + b);
        }
      }
      else if (b > c)
      { // B
        result = need(b, a + c);
      }
      else
      { // C
        result = need(c, a + b);
      }
      Console.WriteLine(result);
    }
  }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, c;
            string[] s = Console.ReadLine().Split(' ');
            a = int.Parse(s[0]);
            b = int.Parse(s[1]);
            c = int.Parse(s[2]);
            if(c+b<=a)
                Console.WriteLine(a-(c+b)+1);
            else if(c+a<=b)
                Console.WriteLine(b-(c+a)+1);
            else if(a+b<=c)
                Console.WriteLine(c-(a+b)+1);
            else
                Console.WriteLine(0);
        }
    }
}

using System;
class Codeforces_1064A
{
    static void Main()
    {
        int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
        Array.Sort(a);
        int cnt = 0;
        while (a[0] + a[1] <= a[2])
        {
            a[0]++; cnt++;
        }
        Console.Write(cnt);
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int a = int.Parse(s[0]);
            int b= int.Parse(s[1]);
            int c = int.Parse(s[2]);
            int t = 0;
            if (a>=b+c)
                t=a-(b+c)+1;
            else if (b>=a+c)
                t = b - (a + c)+1;
            else if (c>=a+b)
                t = c - (a + b)+1;
            Console.WriteLine(t);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MakeTriangle
{
    class Program
    {
        static int Turn(int a,int b,int c)
        {
            int max = 0,s = 0;
            if (a > b && a > c)
            {
                max = a;
                s = max - b - c;
            }
            else if (b > c)
            {
                max = b;
                s = max - a - c;
            }
            else
            {
                max = c;
                s = max - b - a;
            }
            if (s >= 0)
            {
                return s + 1;
            }
            else
            {
                return 0;
            }
        }

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int[] arr = s.Split().Select(v => int.Parse(v)).ToArray();
            int a = arr[0], b = arr[1], c = arr[2];

            Console.WriteLine(Turn(a, b, c));

            //int T1a = 3, T1b = 4, T1c = 5;
            //if (Turn(T1a,T1b,T1c) != 0)
            //{
            //    throw new Exception("Error");
            //}
            //int T2a = 3, T2b = 5, T2c = 2;
            //if (Turn(T2a, T2b, T2c) != 1)
            //{
            //    throw new Exception("Error");
            //}
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _1
{
    class Program
    {
        public static bool treug(int a, int b, int c)
        {
            if ((a + b > c) && (a + c > b) && (b + c > a)) return true;
            else return false;
        }
        public static int min(int a, int b, int c)
        {
            int min = 1;
            if (b < a) min = 2;
            if (c < b) min = 3;
            return min;
        }
        static void Main(string[] args)
        {
            int a, b, c;
            string[] w = Console.ReadLine().Split(' ');
            a = int.Parse(w[0]);
            b = int.Parse(w[1]);
            c = int.Parse(w[2]);
            int add = 0;
            while (!(treug(a, b, c)))
            {
                if (min(a, b, c) == 1) a++;
                else if (min(a, b, c) == 2) b++;
                else c++;
                add++;
            }
            Console.Write(add);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

public class Solver
{
    public void Solve()
    {
        var a = ReadIntArray();
        Array.Sort(a);
        Write(Math.Max(0, a[2] - a[0] - a[1] + 1));
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solver().Solve();
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUG
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}

using System;

namespace CF_1064_A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int a = int.Parse(s[0]);
            int b = int.Parse(s[1]);
            int c = int.Parse(s[2]);

            int max = Math.Max(a, Math.Max(b, c));
            int min = Math.Min(a, Math.Min(b, c));
            int mid;
            if (max == a) mid = Math.Max(b, c);
            else if (max == b) mid = Math.Max(a, c);
            else mid = Math.Max(b, a);

            if (max < mid + min)
                Console.WriteLine(0);
            else
                Console.WriteLine(max - (mid+min)+1);
        }
    }
}

using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
class Problem
{
    static void Main()
    {
        //--------------------------------input--------------------------------//

        var v = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );
        Array.Sort( v );
        int a = v[0];
        int b = v[1];
        int c = v[2];

        //--------------------------------solve--------------------------------//

        if(c >= a + b)
            Console.WriteLine( c + 1 - a - b );
        else
            Console.WriteLine( 0 );

    }
}

using System;
using System.Collections.Generic;
using System.Linq;

public class Class2
{
    static void Main()
    {
        var a = Console.ReadLine().Split().Select(x => int.Parse(x)).OrderBy(x => x).ToArray();
        var res = a[2] - a[1] - a[0] + 1;
        Console.WriteLine(res < 0 ? 0 : res);
    }
}

using System;
class Program
{
    static void Main()
    {
        int[] array = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
        Array.Sort(array);
        if (array[0] < array[1] + array[2] && array[1] < array[0] + array[2] && array[2] < array[0] + array[1])
            Console.WriteLine(0);
        else Console.WriteLine(array[2]-(array[1]+array[0])+1);
    }
}

using System;
using System.Collections.Generic;

namespace HackerEarthProject
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            var x = s.Split(' ');
            int a = int.Parse(x[0]);
            int b = int.Parse(x[1]);
            int c = int.Parse(x[2]);
            int ans = 0;
            if (a + b <= c)
            {
                ans += c + 1 - a - b;
            }
            if(b+c <= a)
            {
                ans += a + 1 - b - c;
            }
            if(c+a <= b)
            {
                ans += b + 1 - c - a;
            }
            Console.WriteLine(ans);
        }
    }
}

using System;

namespace A {
    class myClass {
        static int[] readArray() {
            string[] tokens = Console.ReadLine().Split();
            int[] res = new int[tokens.Length];
            for(int i = 0; i < tokens.Length; i++) {
                res[i] = Convert.ToInt32(tokens[i]);
            }
            return res;
        }

        public static void Main(string[] args) {
            int[] array = readArray();
            Array.Sort(array);
            int res = Math.Max(0, array[2]-(array[0]+array[1])+1);
            Console.WriteLine(res);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ТЕСТЫ
{
class Program
{
static void Main(string[] args)
{
//a, b и c - стороны
// за одну итерацию - одно увеличение на 1 сантиметр
//x1<=x2+x3
//x2<=x1+x3
//x3<=x1+x2

int[] arr = Console.ReadLine().Split(new []{' '}, StringSplitOptions.RemoveEmptyEntries)
.Select(str => Convert.ToInt32(str)).ToArray();
int max= arr.Max();//MAX

int SumMins = 0;

int imax = Array.IndexOf(arr, arr.Max());
for (int i = 0; i < arr.Length; i++)
if (i != imax)
SumMins += arr[i];

if (max + 1 < SumMins)
Console.WriteLine(0);
else
Console.WriteLine(max+1-SumMins);

}
}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			var inputs1 = input1.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList();

			int max = inputs1.Max();
			int result = 2 * max - inputs1.Sum() + 1;
			if (result < 0)
			{
				result = 0;
			}

			Console.WriteLine(result);
		}

		//private static long GCD(long a, long b)
		//{
		//	long max = Math.Max(a, b);
		//	long min = Math.Min(a, b);

		//	if (min == 0)
		//	{
		//		return max;
		//	}

		//	a = min;
		//	b = max % min;
		//	return GCD(a, b);
		//}

		//private static long LCM(long a, long b)
		//{
		//	return Math.Abs(a * b) / GCD(a, b);
		//}

		//private static int Length(short[] a)
		//{
		//	int firstItemIndex = 0;
		//	for (int i = 0; i < a.Length; i++)
		//	{
		//		if (a[i] == 0)
		//		{
		//			continue;
		//		}

		//		firstItemIndex = i;
		//		break;
		//	}

		//	return a.Length - firstItemIndex;
		//}

		//private static short[] Subtract(short[] a, short[] b)
		//{
		//	if (a.Length != b.Length)
		//	{
		//		throw new ArgumentException();
		//	}

		//	short[] result = new short[a.Length];
		//	Array.Copy(a, result, a.Length);
		//	for (int i = result.Length - 1; i >= 0; i--)
		//	{
		//		if (result[i] < b[i])
		//		{
		//			int j = i - 1;
		//			while (result[j] == 0)
		//			{
		//				result[j--] = 9;
		//			}

		//			result[j]--;
		//			result[i] += 10;
		//		}

		//		result[i] -= b[i];
		//	}

		//	return result;
		//}

		//private static short[] Multiply(short[] a, int b)
		//{
		//	short[] result = new short[a.Length];
		//	for (int i = a.Length - 1; i > 0; i--)
		//	{
		//		int temp = a[i] * b;
		//		result[i] = (short)(result[i] + temp % 10);
		//		result[i - 1] = (short)(result[i - 1] + temp / 10);
		//	}

		//	return result;
		//}

		//private static int Mod(short[] a, int b)
		//{
		//	int rest = 0, i = 0;
		//	while (i < a.Length)
		//	{
		//		int d = 10 * rest + a[i];
		//		while (d < b && i < a.Length - 1)
		//		{
		//			d = 10 * d + a[++i];
		//		}

		//		rest = d % b;
		//		i++;
		//	}

		//	return rest;
		//}

		//private static short[] Divide(short[] a, int b)
		//{
		//	short[] result = new short[a.Length];
		//	int rest = 0, i = 0;
		//	while (i < a.Length)
		//	{
		//		int d = 10 * rest + a[i];
		//		while (d < b && i < a.Length - 1)
		//		{
		//			d = 10 * d + a[++i];
		//		}

		//		result[i] = (short)(d / b);
		//		rest = d % b;
		//		i++;
		//	}

		//	return result;
		//}
	}
}

using System;

namespace _1064_Make_a_triangle
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            Array.Sort(a);
            var count = 0;
            //while (a[0] + a[1] <= a[2])
            //{
            //    count++;
            //    a[0]++;
            //}
            if (a[0] + a[1] <= a[2])
            {
                count = a[2]-(a[0]+a[1])+1;
            }

            Console.WriteLine(count);
        }
    }
}

using System;

namespace _1064_Make_a_triangle
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            Array.Sort(a);
            var count = 0;
            while (a[0] + a[1] <= a[2])
            {
                count++;
                a[0]++;
            }

            Console.WriteLine(count);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
{
    static void Main(string[] args)
    {
        int[] t = Array.ConvertAll(Console.ReadLine().Split(' '), x => int.Parse(x));
        Array.Sort(t);
        int ans = (t[2] - (t[0] + t[1])) + 1;
        Console.WriteLine((ans < 0) ? 0 : ans);
    }
}

using System;
using System.Linq;

namespace Achill
{
    class Program
    {
        static void Main()
        {
            int[] abc = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToArray();
            int max = abc[0], pos = 0;
            for(int i = 1; i < 3; ++i)
            {
                if(max < abc[i])
                {
                    max = abc[i];
                    pos = i;
                }
            }
            for(int i = 0; i < 3; ++i)
            {
                if(i != pos)
                {
                    max -= abc[i];
                }
            }
            Console.WriteLine(max < 0 ? 0 : max + 1);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> arr = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToList();

            arr.Sort();

            Console.WriteLine($"{arr[2] - (arr[0] + arr[1]) + 1 }");
        }
    }
}

using System.Linq;
using System.Collections.Generic;
using System;

namespace MyApp
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 0, b = 0, c = 0;
            var inp = Console.ReadLine().Split();
            a = Convert.ToInt32(inp[0]);
            b = Convert.ToInt32(inp[1]);
            c = Convert.ToInt32(inp[2]);
            if(a > c) {
              c = a;
            }
            if(b > c) {
              c = b;
            }
            if(0 > c - (a + b - 1)) {
              Console.WriteLine(0);
            } else {
              Console.WriteLine(c - (a + b - 1));
            }
        }
    }
}

using System.Linq;
using System.Collections.Generic;
using System;

namespace MyApp
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 0, b = 0, c = 0;
            var inp = Console.ReadLine().Split();
            a = Convert.ToInt32(inp[0]);
            b = Convert.ToInt32(inp[1]);
            c = Convert.ToInt32(inp[2]);
            if(a > c) {
              int temp = c;
              c = a;
              a = c;
            }
            if(b > c) {
              int temp = c;
              c = b;
              b = c;
            }
            int ans = 0;
            if(c - (a + b - 1) > ans) {
              ans = c - (a + b - 1);
            }
            Console.WriteLine(ans);
        }
    }
}

using System;

public static class TriangleSolution
{
	public static string Numbers = Console.ReadLine();
	public static int Length = Numbers.Length;
	public static int CurrentSide = 1;
	public static string[] separateNumbers = new string[3];
	public static int[] integerNumbers = new int[3];
	public static int numberOfMinutes = 1;
	public static int shortestSide1;
	public static int shortestSide2;
	public static int longestSide;
	public static void getSideLengths()
	{
		char letter = '0';
		for(int i = 0; i < Length; i++)
		{
			letter = Numbers[i];
			if(letter == ' ')
			{
				CurrentSide = CurrentSide + 1;

			}
			else
			{

				separateNumbers[CurrentSide - 1] = separateNumbers[CurrentSide - 1] + letter + "";

			}
		}
	}
	public static void convertArrayToInteger(string[] chosenArray, int[] targetArray)
	{
		for(int i = 0; i < chosenArray.Length; i++)
		{
			targetArray[i] = int.Parse(chosenArray[i]);
		}
	}
	public static void declareSides(int sideShorter, int sideShorter2, int sideLonger)
	{
		shortestSide1 = sideShorter;
		shortestSide2 = sideShorter2;
		longestSide = sideLonger;
	}
	public static void orderSides(int[] integerSideLengths)
	{
			if(integerSideLengths[0] > integerSideLengths[1])
			{
				if(integerSideLengths[0] > integerSideLengths[2])
				{
					if(integerSideLengths[1] > integerSideLengths[2])
						declareSides(integerSideLengths[2],integerSideLengths[1],integerSideLengths[0]);
					else declareSides(integerSideLengths[1],integerSideLengths[2],integerSideLengths[0]);
				}
				else
				{
					declareSides(integerSideLengths[1],integerSideLengths[0],integerSideLengths[2]);
				}
			}
			else if (integerSideLengths[0] > integerSideLengths[2])
				declareSides(integerSideLengths[0],integerSideLengths[2],integerSideLengths[1]);
			else
			{
				declareSides(integerSideLengths[0],integerSideLengths[1],integerSideLengths[2]);
			}
	}
	public static void Main()
	{
		getSideLengths();
		convertArrayToInteger(separateNumbers, integerNumbers);

		orderSides(integerNumbers);

		numberOfMinutes = (longestSide - shortestSide1) - shortestSide2;
		if(numberOfMinutes < 0)
		{
			numberOfMinutes = 0;
		}
		else numberOfMinutes++;

		Console.WriteLine(numberOfMinutes);
	}

}

using System;

public static class TriangleSolution
{
	public static string Numbers = Console.ReadLine();
	public static int Length = Numbers.Length;
	public static int CurrentSide = 1;
	public static string[] separateNumbers = new string[3];
	public static int[] integerNumbers = new int[3];
	public static int numberOfMinutes = 1;
	public static int shortestSide1;
	public static int shortestSide2;
	public static int longestSide;
	public static void getSideLengths()
	{
		char letter = '0';
		for(int i = 0; i < Length; i++)
		{
			letter = Numbers[i];
			if(letter == ' ')
			{
				CurrentSide = CurrentSide + 1;

			}
			else
			{

				separateNumbers[CurrentSide - 1] = separateNumbers[CurrentSide - 1] + letter + "";

			}
		}
	}
	public static void convertArrayToInteger(string[] chosenArray, int[] targetArray)
	{
		for(int i = 0; i < chosenArray.Length; i++)
		{
			targetArray[i] = int.Parse(chosenArray[i]);
		}
	}
	public static void declareSides(int sideShorter, int sideShorter2, int sideLonger)
	{
		shortestSide1 = sideShorter;
		shortestSide2 = sideShorter2;
		longestSide = sideLonger;
	}
	public static void orderSides(int[] integerSideLengths)
	{
			if(integerSideLengths[0] > integerSideLengths[1])
			{
				if(integerSideLengths[0] > integerSideLengths[2])
				{
					if(integerSideLengths[1] > integerSideLengths[2])
						declareSides(integerSideLengths[2],integerSideLengths[1],integerSideLengths[0]);
					else declareSides(integerSideLengths[1],integerSideLengths[2],integerSideLengths[0]);
				}
				else
				{
					declareSides(integerSideLengths[1],integerSideLengths[0],integerSideLengths[2]);
				}
			}
			else if (integerSideLengths[0] > integerSideLengths[2])
				declareSides(integerSideLengths[0],integerSideLengths[2],integerSideLengths[1]);
			else
			{
				declareSides(integerSideLengths[0],integerSideLengths[1],integerSideLengths[2]);
			}
	}
	public static void Main()
	{
		getSideLengths();
		convertArrayToInteger(separateNumbers, integerNumbers);
		//Console.WriteLine(separateNumbers[2]);
		orderSides(integerNumbers);
		//Console.WriteLine(integerNumbers[2]);
		//Console.WriteLine(longestSide + "" + shortestSide1 + "" + shortestSide2);
		numberOfMinutes = (longestSide - shortestSide1) - shortestSide2;
		if(numberOfMinutes <= 0)
		{
			numberOfMinutes = 0;
		}
		else numberOfMinutes++;
		/*Console.WriteLine(Numbers);
		Console.WriteLine(separateNumbers[1]);
		Console.WriteLine(integerNumbers[1]);
		Console.WriteLine(longestSide + " " + shortestSide1);*/
		Console.WriteLine(numberOfMinutes);
	}

}

using System;

public static class TriangleSolution
{
	public static string Numbers = Console.ReadLine();
	public static int Length = Numbers.Length;
	public static int CurrentSide = 1;
	public static string[] separateNumbers = new string[3];
	public static int[] integerNumbers = new int[3];
	public static int numberOfMinutes = 1;
	public static int shortestSide1;
	public static int shortestSide2;
	public static int longestSide;
	public static void getSideLengths()
	{
		char letter = '0';
		for(int i = 0; i < Length; i++)
		{
			letter = Numbers[i];
			if(letter == ' ')
			{
				CurrentSide = CurrentSide + 1;

			}
			else
			{

				separateNumbers[CurrentSide - 1] = separateNumbers[CurrentSide - 1] + letter + "";

			}
		}
	}
	public static void convertArrayToInteger(string[] chosenArray, int[] targetArray)
	{
		for(int i = 0; i < chosenArray.Length; i++)
		{
			targetArray[i] = int.Parse(chosenArray[i]);
		}
	}
	public static void declareSides(int sideShorter, int sideShorter2, int sideLonger)
	{
		shortestSide1 = sideShorter;
		shortestSide2 = sideShorter2;
		longestSide = sideLonger;
	}
	public static void orderSides(int[] integerSideLengths)
	{
			if(integerSideLengths[0] > integerSideLengths[1])
			{
				if(integerSideLengths[0] > integerSideLengths[2])
				{
					if(integerSideLengths[1] > integerSideLengths[2])
						declareSides(integerSideLengths[2],integerSideLengths[1],integerSideLengths[0]);
					else declareSides(integerSideLengths[1],integerSideLengths[2],integerSideLengths[0]);
				}
				else
				{
					declareSides(integerSideLengths[1],integerSideLengths[0],integerSideLengths[2]);
				}
			}
			else if (integerSideLengths[0] > integerSideLengths[2])
				declareSides(integerSideLengths[0],integerSideLengths[2],integerSideLengths[1]);
			else
			{
				declareSides(integerSideLengths[0],integerSideLengths[1],integerSideLengths[2]);
			}
	}
	public static void Main()
	{
		getSideLengths();
		convertArrayToInteger(separateNumbers, integerNumbers);
		//Console.WriteLine(separateNumbers[2]);
		orderSides(integerNumbers);
		//Console.WriteLine(integerNumbers[2]);
		//Console.WriteLine(longestSide + "" + shortestSide1 + "" + shortestSide2);
		numberOfMinutes = (longestSide - shortestSide1) - shortestSide2;
		if(numberOfMinutes < 0)
		{
			numberOfMinutes = 0;
		}
		else numberOfMinutes++;
		/*Console.WriteLine(Numbers);
		Console.WriteLine(separateNumbers[1]);
		Console.WriteLine(integerNumbers[1]);
		Console.WriteLine(longestSide + " " + shortestSide1);*/
		Console.WriteLine(numberOfMinutes);
	}

}

using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
class Problem
{
    static void Main()
    {
        //--------------------------------input--------------------------------//

        var v = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );
        Array.Sort( v );
        int a = v[0];
        int b = v[1];
        int c = v[2];

        //--------------------------------solve--------------------------------//

        Console.WriteLine( c + 1 - a - b );

    }
}

using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
class Problem
{
    static void Main()
    {
        //--------------------------------input--------------------------------//

        var v = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );
        Array.Sort( v );
        int a = v[0];
        int b = v[1];
        int c = v[2];

        //--------------------------------solve--------------------------------//

        if(c > a + b)
            Console.WriteLine( c + 1 - a - b );
        else
            Console.WriteLine( 0 );

    }
}

using System;
using System.Linq;

namespace Achill
{
    class Program
    {
        static void Main()
        {
            int[] abc = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToArray();
            int max = abc[0], pos = 0;
            for(int i = 1; i < 3; ++i)
            {
                if(max < abc[i])
                {
                    max = abc[i];
                    pos = i;
                }
            }
            int res = 0;
            for(int i = 0; i < 3; ++i)
            {
                if(i != pos)
                {
                    res += max - abc[i];
                }
            }
            Console.WriteLine(res < 0 ? 0 : res + 1);
        }
    }
}


You are given n distinct points on a plane with integral coordinates. For each point you can either draw a vertical line through it, draw a horizontal line through it, or do nothing.You consider several coinciding straight lines as a single one. How many distinct pictures you can get? Print the answer modulo 109 + 7.

The first line contains single integer n (1 ≤ n ≤ 105) — the number of points. n lines follow. The (i + 1)-th of these lines contains two integers xi, yi ( - 109 ≤ xi, yi ≤ 109) — coordinates of the i-th point. It is guaranteed that all points are distinct.

Print the number of possible distinct pictures modulo 109 + 7.

NoteIn the first example there are two vertical and two horizontal lines passing through the points. You can get pictures with any subset of these lines. For example, you can get the picture containing all four lines in two ways (each segment represents a line containing it). The first way:      The second way:      In the second example you can work with two points independently. The number of pictures is 32 = 9.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

namespace Codeforces
{
    class E
    {
        private static ThreadStart  s_threadStart = new E().Go;

        class Point
        {
            public int X, Y;
            public bool Keep;
        }

        long[] F;

        private void Go()
        {
            long mod = 1000000007;

            int n = GetInt();
            Point[] points = new Point[n];
            for (int i = 0; i < n; i++)
            {
                points[i] = new Point() { X = GetInt(), Y = GetInt() };
            }

            F = new long[2*n + 1];
            F[0] = 1;
            for (int i = 1; i <= 2 * n; i++)
                F[i] = (F[i - 1] * i) % mod;

            Dictionary<int, List<int>> xDict = new Dictionary<int, List<int>>();
            Dictionary<int, List<int>> yDict = new Dictionary<int, List<int>>();
            for(int i = 0; i < n; i++)
            {
                List<int> list;
                if (!xDict.TryGetValue(points[i].X, out list))
                    list = xDict[points[i].X] = new List<int>();

                list.Add(i);

                if (!yDict.TryGetValue(points[i].Y, out list))
                    list = yDict[points[i].Y] = new List<int>();

                list.Add(i);
            }

            long ans = 1;

            Queue<int> queue = new Queue<int>();
            while (xDict.Count > 0)
            {
                int k = 0;
                int m = 0;
                var pair = xDict.First();
                queue.Enqueue(pair.Value[0]);

                HashSet<int> xDir = new HashSet<int>();
                HashSet<int> yDir = new HashSet<int>();
                HashSet<int> pSet = new HashSet<int>();

                while (queue.Count > 0)
                {
                    int pp = queue.Dequeue();
                    Point point = points[pp];
                    pSet.Add(pp);
                    xDir.Add(point.X);
                    yDir.Add(point.Y);
                    if (xDict.ContainsKey(point.X))
                    {
                        foreach (int z in xDict[point.X])
                            if (z != pp)
                                queue.Enqueue(z);
                    }
                    if (yDict.ContainsKey(point.Y))
                    {
                        foreach (int z in yDict[point.Y])
                            if (z != pp)
                                queue.Enqueue(z);
                    }
                    xDict.Remove(point.X);
                    yDict.Remove(point.Y);
                }

                ans *= Bin(xDir.Count() + yDir.Count(), pSet.Count(), mod);
                ans %= mod;
            }

            Wl(ans);
        }

        long Bin(long n, long k, long mod)
        {
            if (n < k)
                k = n;

            long ans = 0;
            for (int i = 0; i <= k; i++)
            {
                long add = F[n];
                add *= Inv(F[i], mod);
                add %= mod;
                add *= Inv(F[n - i], mod);
                add %= mod;
                ans += add;
                ans %= mod;
            }
            return ans;
        }

        public static long Pow(long a, long n, long mod)
        {
            long res = 1L;
            while (n > 0)
            {
                if ((n & 1) != 0)
                    res = (res * a) % mod;
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long Inv(long a, long mod)
        {
            return Pow(a, mod - 2, mod);
        }

        #region Template

        private static StringBuilder output = new StringBuilder();

        public static void Main(string[] args)
        {
            System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
            output.Length = 0;
            Thread main = new Thread(new ThreadStart(s_threadStart), 512 * 1024 * 1024);
            timer.Start();
            main.Start();
            main.Join();
            Console.Write(output);
            timer.Stop();
            Console.Error.WriteLine(timer.ElapsedMilliseconds);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            do
            {
                while (ioEnum == null || !ioEnum.MoveNext())
                {
                    ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
                }
            } while (string.IsNullOrEmpty(ioEnum.Current));

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString());
        }

        private static long GetLong()
        {
            return long.Parse(GetString());
        }

        private static double GetDouble()
        {
            return double.Parse(GetString());
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            W(o);
            output.Append(Console.Out.NewLine);
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            W(enumerable);
            output.Append(Console.Out.NewLine);
        }

        private static void W<T>(T o)
        {
            if (o is double)
            {
                Wd((o as double?).Value, "");
            }
            else if (o is float)
            {
                Wd((o as float?).Value, "");
            }
            else
                output.Append(o.ToString());
        }

        private static void W<T>(IEnumerable<T> enumerable)
        {
            W(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        private static void Wd(double d, string format)
        {
            W(d.ToString(format, CultureInfo.InvariantCulture));
        }

        #endregion
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

namespace Codeforces
{
    class E
    {
        private static ThreadStart  s_threadStart = new E().Go;

        class Point
        {
            public int X, Y;
            public bool Keep;
        }

        private void Go()
        {
            long mod = 1000000007;

            int n = GetInt();
            Point[] points = new Point[n];
            for (int i = 0; i < n; i++)
            {
                points[i] = new Point() { X = GetInt(), Y = GetInt() };
            }

            Dictionary<int, List<int>> xDict = new Dictionary<int, List<int>>();
            Dictionary<int, List<int>> yDict = new Dictionary<int, List<int>>();
            for(int i = 0; i < n; i++)
            {
                List<int> list;
                if (!xDict.TryGetValue(points[i].X, out list))
                    list = xDict[points[i].X] = new List<int>();

                list.Add(i);

                if (!yDict.TryGetValue(points[i].Y, out list))
                    list = yDict[points[i].Y] = new List<int>();

                list.Add(i);
            }

            long ans = 1;

            int k = n;
            for (int i = 0; i < n; i++)
            {
                if (xDict[points[i].X].Count == 1 && yDict[points[i].Y].Count == 1)
                {
                    ans *= 3;
                    ans %= mod;
                    xDict.Remove(points[i].X);
                    yDict.Remove(points[i].Y);
                    k--;
                }
            }

            int m = xDict.Count() + yDict.Count();

            ans *= Bin(m, k, mod);
            ans %= mod;
            Wl(ans);
        }

        long Bin(long n, long k, long mod)
        {
            if (n < 2) return 1;

            long[] bin = new long[k + 1]; bin[0] = 1; bin[1] = 1;
            long[] next = new long[k + 1];
            long[] t;

            for (int i = 2; i <= k; i++)
            {
                next[0] = 1; next[i] = 1;
                for (int j = 1; j <= k && j < i; j++)
                    next[j] = (bin[j] + bin[j - 1]) % mod;

                t = bin;
                bin = next;
                next = t;
            }

            long ans = 0;
            for (int i = 0; i <= k; i++)
            {
                ans += bin[i];
                ans %= mod;
            }
            return ans;
        }

        #region Template

        private static StringBuilder output = new StringBuilder();

        public static void Main(string[] args)
        {
            System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
            output.Length = 0;
            Thread main = new Thread(new ThreadStart(s_threadStart), 512 * 1024 * 1024);
            timer.Start();
            main.Start();
            main.Join();
            Console.Write(output);
            timer.Stop();
            Console.Error.WriteLine(timer.ElapsedMilliseconds);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            do
            {
                while (ioEnum == null || !ioEnum.MoveNext())
                {
                    ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
                }
            } while (string.IsNullOrEmpty(ioEnum.Current));

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString());
        }

        private static long GetLong()
        {
            return long.Parse(GetString());
        }

        private static double GetDouble()
        {
            return double.Parse(GetString());
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            W(o);
            output.Append(Console.Out.NewLine);
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            W(enumerable);
            output.Append(Console.Out.NewLine);
        }

        private static void W<T>(T o)
        {
            if (o is double)
            {
                Wd((o as double?).Value, "");
            }
            else if (o is float)
            {
                Wd((o as float?).Value, "");
            }
            else
                output.Append(o.ToString());
        }

        private static void W<T>(IEnumerable<T> enumerable)
        {
            W(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        private static void Wd(double d, string format)
        {
            W(d.ToString(format, CultureInfo.InvariantCulture));
        }

        #endregion
    }
}