simple calculations through IO