public static void Main()
capacity = Convert.ToInt32(Console.ReadLine());
stationCount = Convert.ToInt32(Console.ReadLine());
if (capacity < 1 || capacity > 40 || stationCount < 2 || stationCount > 10)
Console.WriteLine("Fel värde har angivits");
for (int i = 0; i < stationCount; i++)
int leaving = Convert.ToInt32(Console.ReadLine());
int entering = Convert.ToInt32(Console.ReadLine());
int staying = Convert.ToInt32(Console.ReadLine());
if(i == 0 && leaving != 0)
if(staying > 0 && i == stationCount - 1)
currentCapacity += staying;
currentCapacity -= leaving;
if(currentCapacity > capacity)
Console.WriteLine("Möjligt.");
Console.WriteLine("Omöjligt.");