1 | #include <bits/stdc++.h> |
2 | |
3 | using namespace std; |
4 | |
5 | int main() { |
6 | int max; |
7 | cin >> max; |
8 | while (true) { |
9 | int x; |
10 | cin >> x; |
11 | if (x == 0) { |
12 | break; |
13 | } |
14 | |
15 | if (x > max) { |
16 | max = x; |
17 | } |
18 | } |
19 | |
20 | cout << max; |
21 | return 0; |
22 | } |
23 | |
24 | |