#include <stdio.h>
#define t 10 //zp
#define s 40 //sverh
#define u 1.5 //sverh*
#define n1 0.15 //tax1
#define n2 0.2
#define n3 0.25
#define m1 300 //maxbeftax2
#define m2 150


int main() {
    int h,tax,a;
    printf("hours: ");
    scanf("%d",&h);

    if (h>s){tax = a = (s*t + ((h-s) * (t*u)));}
    else(tax = a = h*t);  

    if (tax>m1)
    {
        if(tax>m2){tax = (m1*n1) + (m2*n2) + ((tax-m1-m2)*n3);}
        else(tax = (m1*n1) + ((tax-m1)*n2));
    }
    else (tax*=n1);

    printf("Acc: %d\nTax: %d\nReceived: %d",a,tax,a-tax);
    return 0;
}
