#include <iostream> using namespace std; int main() { int n, c = 0, g =1; while (g) { cin >> n; if (n > c) c = n; if (n == 0) g = 0; } cout << c << endl; }