1. 


/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #10494 - If We Were a Child Again
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=16&problem=1435&mosmsg=Submission+received+with+ID+7133639
*
* @author Lermer Florian
* @author Hidir Sayli
* @author Taskin Umut
*
* Status : Accepted
* Runtime: don´t care pls look @ mail
*
* Problems: try BigInteger!
*/


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Main {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line=br.readLine();
while(line!=null)
{
StringTokenizer st=new StringTokenizer(line);
BigInteger x=new BigInteger(st.nextToken());
System.out.println(((st.nextToken().equals("/"))?x.divide(new BigInteger(st.nextToken())):x.mod(new BigInteger(st.nextToken()))));
line=br.readLine();
}
}

}