#include <stdio.h>

int main()
 {
    int a=40;
    int c=212;
    int max=0;
    max=(-8+22)*a-10+c/2;
    printf("%d",max);

    return 0;
}