import std.stdio;
import std.conv;
import std.array;

void main()
{
    int N = readln.split[0].to!int;
    int[] H = readln.split.to!(int[]);

    writeln(H[0]);

    int max = 0;
    int ans = 0;
    foreach (h; H){
        if (h >= max){
            ans++;
            max = h;
        }
    }

    writeln(ans);
}

