﻿using System;

public class Water_Overflow
{
    public static void Main()
    {
        var waterTankCapacity = 255;

        var linesCount = int.Parse(Console.ReadLine());

        var litersInTheTrank = 0;

        for (int i = 0; i < linesCount; i++)
        {
            var waterLiter = int.Parse(Console.ReadLine());

            if (waterLiter + litersInTheTrank > waterTankCapacity)
            {
                Console.WriteLine("Insufficient capacity!");
                continue;

            }

            litersInTheTrank += waterLiter;
        }

        Console.WriteLine(litersInTheTrank);
    }
}