print([7,11,26,45,83,125,140,182,197,201,216,239,258,311,330,353,444,467,482][int(input()) - 1])