import std.stdio;
import std.string;
import std.algorithm;
import std.conv;

void main()
{
    auto s1 = split(readln);
    //auto a = map(to!int)(s1);
    auto s2 = split(readln);
    long count;
    long sum;
    foreach (val; s2)
    {
        if (to!long(val) <= to!long(s1[1]))
            sum += to!long(val);
        if (sum > to!long(s1[2]))
        {
            sum = 0;
            count++;
        }
    }
    writeln(count);
}