1. 

/**
* 10970 - Big Chocolate
*
* Studiengruppe: IFB2C
*
* Robert Reichart
* Elvin Uzeirovic
* Martin Pesl
*
* Run Time Submission Date
* 2.920 2009-04-30 22:13:26
*/


import java.io.*;
import java.util.*;

class Main{
public static void main(String... args)throws IOException{
BufferedReader is= new BufferedReader(new InputStreamReader(System.in));


String line= is.readLine();
while (line!=null){
//System.out.println(line);
String[] werte = line.split(" ");
//System.out.println(Arrays.toString(werte));
System.out.println(Integer.parseInt(werte[0])*Integer.parseInt(werte[1])-1);
line=is.readLine();
}
}
}

2.

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #10970 Big Chocolate
*
* @author David Leib
* @author Julius Tschannerl
* @version 1.0, 05/08/2009
*
* Status : Accepted
* Runtime: 1.048
*/
//package chocolate;

import java.util.*;
import java.io.*;

public class Main {

public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
while(line != null){
StringTokenizer st = new StringTokenizer(line);
int i = Integer.parseInt(st.nextToken());
int j = Integer.parseInt(st.nextToken());
System.out.println(i*j-1);
line = br.readLine();
}
}
}