/**                                                                   
 *            .,,       .,:;;iiiiiiiii;;:,,.     .,,                  
 *          rGB##HS,.;iirrrrriiiiiiiiiirrrrri;,s&##MAS,               
 *         r5s;:r3AH5iiiii;;;;;;;;;;;;;;;;iiirXHGSsiih1,              
 *            .;i;;s91;;;;;;::::::::::::;;;;iS5;;;ii:                 
 *          :rsriii;;r::::::::::::::::::::::;;,;;iiirsi,              
 *       .,iri;;::::;;;;;;::,,,,,,,,,,,,,..,,;;;;;;;;iiri,,.          
 *    ,9BM&,            .,:;;:,,,,,,,,,,,hXA8:            ..,,,.      
 *   ,;&@@#r:;;;;;::::,,.   ,r,,,,,,,,,,iA@@@s,,:::;;;::,,.   .;.     
 *    :ih1iii;;;;;::::;;;;;;;:,,,,,,,,,,;i55r;;;;;;;;;iiirrrr,..      
 *   .ir;;iiiiiiiiii;;;;::::::,,,,,,,:::::,,:;;;iiiiiiiiiiiiri        
 *   iriiiiiiiiiiiiiiii;;;::::::::::::::::;;;iiiiiiiiiiiiiiiir;       
 *  ,riii;;;;;;;;;;;;;:::::::::::::::::::::::;;;;;;;;;;;;;;iiir.      
 *  iri;;;::::,,,,,,,,,,:::::::::::::::::::::::::,::,,::::;;iir:      
 * .rii;;::::,,,,,,,,,,,,:::::::::::::::::,,,,,,,,,,,,,::::;;iri      
 * ,rii;;;::,,,,,,,,,,,,,:::::::::::,:::::,,,,,,,,,,,,,:::;;;iir.     
 * ,rii;;i::,,,,,,,,,,,,,:::::::::::::::::,,,,,,,,,,,,,,::i;;iir.     
 * ,rii;;r::,,,,,,,,,,,,,:,:::::,:,:::::::,,,,,,,,,,,,,::;r;;iir.     
 * .rii;;rr,:,,,,,,,,,,,,,,:::::::::::::::,,,,,,,,,,,,,:,si;;iri      
 *  ;rii;:1i,,,,,,,,,,,,,,,,,,:::::::::,,,,,,,,,,,,,,,:,ss:;iir:      
 *  .rii;;;5r,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,sh:;;iri       
 *   ;rii;:;51,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.:hh:;;iir,       
 *    irii;::hSr,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,sSs:;;iir:        
 *     irii;;:iSSs:.,,,,,,,,,,,,,,,,,,,,,,,,,,,..:135;:;;iir:         
 *      ;rii;;:,r535r:...,,,,,,,,,,,,,,,,,,..,;sS35i,;;iirr:          
 *       :rrii;;:,;1S3Shs;:,............,:is533Ss:,;;;iiri,           
 *        .;rrii;;;:,;rhS393S55hh11hh5S3393Shr:,:;;;iirr:             
 *          .;rriii;;;::,:;is1h555555h1si;:,::;;;iirri:.              
 *            .:irrrii;;;;;:::,,,,,,,,:::;;;;iiirrr;,                 
 *               .:irrrriiiiii;;;;;;;;iiiiiirrrr;,.                   
 *                  .,:;iirrrrrrrrrrrrrrrrri;:.                       
 *                        ..,:::;;;;:::,,.                            
 */
#include <iostream>
#include <cstdio>
using namespace std;
int a,b;
int main()
{
	scanf("%d",&a,&b);
	printf("%d",a*b-1*b-1*a+1);
	return 0;
}
/**                                                                         
 *          .,:,,,                                        .::,,,::.         
 *        .::::,,;;,                                  .,;;:,,....:i:        
 *        :i,.::::,;i:.      ....,,:::::::::,....   .;i:,.  ......;i.       
 *        :;..:::;::::i;,,:::;:,,,,,,,,,,..,.,,:::iri:. .,:irsr:,.;i.       
 *        ;;..,::::;;;;ri,,,.                    ..,,:;s1s1ssrr;,.;r,       
 *        :;. ,::;ii;:,     . ...................     .;iirri;;;,,;i,       
 *        ,i. .;ri:.   ... ............................  .,,:;:,,,;i:       
 *        :s,.;r:... ....................................... .::;::s;       
 *        ,1r::. .............,,,.,,:,,........................,;iir;       
 *        ,s;...........     ..::.,;:,,.          ...............,;1s       
 *       :i,..,.              .,:,,::,.          .......... .......;1,      
 *      ir,....:rrssr;:,       ,,.,::.     .r5S9989398G95hr;. ....,.:s,     
 *     ;r,..,s9855513XHAG3i   .,,,,,,,.  ,S931,.,,.;s;s&BHHA8s.,..,..:r:    
 *    :r;..rGGh,  :SAG;;G@BS:.,,,,,,,,,.r83:      hHH1sXMBHHHM3..,,,,.ir.   
 *   ,si,.1GS,   sBMAAX&MBMB5,,,,,,:,,.:&8       3@HXHBMBHBBH#X,.,,,,,,rr   
 *   ;1:,,SH:   .A@&&B#&8H#BS,,,,,,,,,.,5XS,     3@MHABM&59M#As..,,,,:,is,  
 *  .rr,,,;9&1   hBHHBB&8AMGr,,,,,,,,,,,:h&&9s;   r9&BMHBHMB9:  . .,,,,;ri. 
 *  :1:....:5&XSi;r8BMBHHA9r:,......,,,,:ii19GG88899XHHH&GSr.      ...,:rs. 
 *  ;s.     .:sS8G8GG889hi.        ....,,:;:,.:irssrriii:,.        ...,,i1, 
 *  ;1,         ..,....,,isssi;,        .,,.                      ....,.i1, 
 *  ;h:               i9HHBMBBHAX9:         .                     ...,,,rs, 
 *  ,1i..            :A#MBBBBMHB##s                             ....,,,;si. 
 *  .r1,..        ,..;3BMBBBHBB#Bh.     ..                    ....,,,,,i1;  
 *   :h;..       .,..;,1XBMMMMBXs,.,, .. :: ,.               ....,,,,,,ss.  
 *    ih: ..    .;;;, ;;:s58A3i,..    ,. ,.:,,.             ...,,,,,:,s1,   
 *    .s1,....   .,;sh,  ,iSAXs;.    ,.  ,,.i85            ...,,,,,,:i1;    
 *     .rh: ...     rXG9XBBM#M#MHAX3hss13&&HHXr         .....,,,,,,,ih;     
 *      .s5: .....    i598X&&A&AAAAAA&XG851r:       ........,,,,:,,sh;      
 *      . ihr, ...  .         ..                    ........,,,,,;11:.      
 *         ,s1i. ...  ..,,,..,,,.,,.,,.,..       ........,,.,,.;s5i.        
 *          .:s1r,......................       ..............;shs,          
 *          . .:shr:.  ....                 ..............,ishs.            
 *              .,issr;,... ...........................,is1s;.              
 *                 .,is1si;:,....................,:;ir1sr;,                 
 *                    ..:isssssrrii;::::::;;iirsssssr;:..                   
 *                         .,::iiirsssssssssrri;;:.                     
 */