#include <iostream> #include <string> using namespace std; int main() { int max = 0; int a; while (cin >> a and a!=0) { if (a > max) max = a; } cout << max; }