Problem4496--数砖数

4496: 数砖数

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

用三块瓷砖铺设出一个图形:

##
.#
用这种图形将整个平面铺满,形如:

################
.#.#.#.#.#.#.#.#
################
.#.#.#.#.#.#.#.#
################
.#.#.#.#.#.#.#.#
################
.#.#.#.#.#.#.#.#
给定两个整数 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">m,请计算从左上角开始的 lns="http://www.w3.org/1998/Math/MathML">n 行 lns="http://www.w3.org/1998/Math/MathML">m 列的区域中,有多少瓷砖(每块瓷砖用一个 # 字符表示)。

  •  的数据,lns="http://www.w3.org/1998/Math/MathML">1n,m100
  • lns="http://www.w3.org/1998/Math/MathML">60% 的数据,lns="http://www.w3.org/1998/Math/MathML">1n,m1000
  • lns="http://www.w3.org/1998/Math/MathML">100% 的数据,lns="http://www.w3.org/1998/Math/MathML">1n,m10000




Input

  • 第一行:单个整数表示 lns="http://www.w3.org/1998/Math/MathML">n
  • 第二行:单个整数表示 lns="http://www.w3.org/1998/Math/MathML">m

Output

  • 单个整数:表示 # 格子的数量。

Sample Input Copy

4
4

Sample Output Copy

12

HINT

前4行前4列由4个完整的地砖组成

Source/Category