#include #include using namespace std; int LimitLow[4][7] = { {1, 9076, 36901, 89351, 186351, 405101, 406751}, {1, 18151, 73801, 148851, 226851, 405101, 457601}, {1, 12951, 49401, 127551, 206601, 405101, 432201}, {1, 9076, 36901, 74426, 113426, 202551, 228801}, }; double Taxes[7] = { 10, 15, 25, 28, 33, 35, 39.6 }; char Sir[100]; int main() { fgets(Sir, 1000, stdin); if (Sir[strlen(Sir)-1] == '\n') Sir[strlen(Sir)-1] = '\0'; int Type; if (!strcmp(Sir, "Single")) Type = 0; if (!strcmp(Sir, "Married joint filer")) Type = 1; if (!strcmp(Sir, "Surviving spouse")) Type = 1; if (!strcmp(Sir, "Head of household")) Type = 2; if (!strcmp(Sir, "Married filing separately")) Type = 3; int income, i; scanf("%d", &income); for ( i = 0; i < 7; i++ ) { if (LimitLow[Type][i] > income) break; } i--; double sol = income; sol *= Taxes[i]; sol /= 100; printf("%d\n", (int)sol); return 0; }