#include <stdio.h>

int max(int x, int y);   // プロトタイプ宣言

int main(void) {
    int a, b, c, d;

    scanf("%d %d %d %d", &a, &b, &c, &d);

    int result = max(max(a, b), max(c, d));

    printf("%d\n", result);

    return 0;
}

int max(int x, int y) {
    if (x > y) return x;
    else return y;
}
