Calculator with two modes