#include <vector>
#include <functional>

/* max returns the largest element in vector A, which must be nonempty.
 * It is assumed that class LessThanObject defines boolean member 
 * operator(T,T).  The max in A is computed with respect to the ordering 
 * defined by this operator.  In other words, max returns an element m of A 
 * such that for any element x of A, isLess(m, x) is false.
 *
 * The isLess argument is optional.  If it is omitted, isLess(a, b) = (a < b)
 * is used.  Of course, for this to work, bool operator<(T, T) must be defined.
 */
template<typename T, class LessThanObject>
T max(vector<T> A, LessThanObject isLess)
{
	int n = A.size();
	int maxPos = 0;
	for(int i = 1; i < n; ++i)
		if ( isLess(A[maxPos], A[i]) )
			maxPos = i;
	return A[maxPos];
}


/* Specialization for types T on which bool operator< (T a,T b) is defined.
 * In other words, for a, b in T, the expression (a < b) is valid. 
 */
template<typename T>
T max(vector<T> A) { return max(A, less<T>() ); }

//////////  user file /////////////
#include <vector>
#include <iostream>
main()
{
	vector<float> V;
	float x;

	do { cin >> x; V.push_back(x); } while ( cin );
	V.pop_back();
	cout << "there are " << V.size() << " entries" << endl;
//	for(int i = 0; i < V.size(); ++i) cout << V[i] << endl;
//	cout << endl;

	cout << "the max is " << max(V) << endl;
}
