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

public class Box<T>
{
    IList<T> list = new List<T>();

    public int Count
    {
        get { return this.list.Count; }
    }

    public void Add(T element)
    {
        list.Add(element);
    }

    public T Remove()
    {
        var last = list.Last();
        list.RemoveAt(list.Count - 1);

        return last;
    }
}
