The rectangular floor of a bathroom is covered with square tiles (all of the same size). A spider starts at one corner of the bathroom and walks to the diagonally opposite corner. For example, the figure below shows a 6×8 bathroom, in which the spider touches 12 tiles on its path. (A spider doesn't touch a tile if it just walks over the grout at the corner of a tile.) For an m×n bathroom, how many tiles does the spider touch on its walk?