import java.util.Scanner;

public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long a=sc.nextLong();
	  String s=sc.next();
	  long b0=Long.valueOf(s.substring(0, 1)),b1=Long.valueOf(s.substring(2, 3)),b2=Long.valueOf(s.substring(3, 4));

	  long res0=a*b0,res1=a*b1;
	  res1=res1/10;
	  long m1=((a*b1)%10)*10,m2=a*b2,m3=(m1+m2)/100;
	  System.out.println(res0+res1+m3);
	  //System.out.println(m1);
  }
}
 import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long a=sc.nextLong();
	  String s=sc.next();
	  long b0=Long.valueOf(s.substring(0, 1)),b1=Long.valueOf(s.substring(2, 3)),b2=Long.valueOf(s.substring(3, 4));

	  long res0=a*b0,res1=a*b1;
	  res1=res1/10;
	  long m1=((a*b1)%10)*10,m2=a*b2,m3=(m1+m2)/100;
	  System.out.println(res0+res1+m3);
	  //System.out.println(m1);
  }
} Main public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long a=sc.nextLong();
	  String s=sc.next();
	  long b0=Long.valueOf(s.substring(0, 1)),b1=Long.valueOf(s.substring(2, 3)),b2=Long.valueOf(s.substring(3, 4));

	  long res0=a*b0,res1=a*b1;
	  res1=res1/10;
	  long m1=((a*b1)%10)*10,m2=a*b2,m3=(m1+m2)/100;
	  System.out.println(res0+res1+m3);
	  //System.out.println(m1);
  } main {
	  Scanner sc = new Scanner(System.in);
	  long a=sc.nextLong();
	  String s=sc.next();
	  long b0=Long.valueOf(s.substring(0, 1)),b1=Long.valueOf(s.substring(2, 3)),b2=Long.valueOf(s.substring(3, 4));

	  long res0=a*b0,res1=a*b1;
	  res1=res1/10;
	  long m1=((a*b1)%10)*10,m2=a*b2,m3=(m1+m2)/100;
	  System.out.println(res0+res1+m3);
	  //System.out.println(m1);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a=sc.nextLong(); a sc.nextLong() sc.nextLong sc String s=sc.next(); s sc.next() sc.next sc long b0=Long.valueOf(s.substring(0, 1)) b0 Long.valueOf(s.substring(0, 1)) Long.valueOf Long s.substring(0, 1) s.substring s 0 1 b1=Long.valueOf(s.substring(2, 3)) b1 Long.valueOf(s.substring(2, 3)) Long.valueOf Long s.substring(2, 3) s.substring s 2 3 b2=Long.valueOf(s.substring(3, 4)); b2 Long.valueOf(s.substring(3, 4)) Long.valueOf Long s.substring(3, 4) s.substring s 3 4 long res0=a*b0 res0 a*b0 a b0 res1=a*b1; res1 a*b1 a b1 res1=res1/10 res1 res1/10 res1 10 long m1=((a*b1)%10)*10 m1 ((a*b1)%10)*10 ((a*b1)%10) (a*b1) a b1 10 10 m2=a*b2 m2 a*b2 a b2 m3=(m1+m2)/100; m3 (m1+m2)/100 (m1+m2) m1 m2 100 System.out.println(res0+res1+m3) System.out.println System.out System System.out res0+res1+m3 res0+res1+m3 res0 res1 m3 String[] args args public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long a=sc.nextLong();
	  String s=sc.next();
	  long b0=Long.valueOf(s.substring(0, 1)),b1=Long.valueOf(s.substring(2, 3)),b2=Long.valueOf(s.substring(3, 4));

	  long res0=a*b0,res1=a*b1;
	  res1=res1/10;
	  long m1=((a*b1)%10)*10,m2=a*b2,m3=(m1+m2)/100;
	  System.out.println(res0+res1+m3);
	  //System.out.println(m1);
  }
} public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long a=sc.nextLong();
	  String s=sc.next();
	  long b0=Long.valueOf(s.substring(0, 1)),b1=Long.valueOf(s.substring(2, 3)),b2=Long.valueOf(s.substring(3, 4));

	  long res0=a*b0,res1=a*b1;
	  res1=res1/10;
	  long m1=((a*b1)%10)*10,m2=a*b2,m3=(m1+m2)/100;
	  System.out.println(res0+res1+m3);
	  //System.out.println(m1);
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long a=sc.nextLong();
	  String s=sc.next();
	  long b0=Long.valueOf(s.substring(0, 1)),b1=Long.valueOf(s.substring(2, 3)),b2=Long.valueOf(s.substring(3, 4));

	  long res0=a*b0,res1=a*b1;
	  res1=res1/10;
	  long m1=((a*b1)%10)*10,m2=a*b2,m3=(m1+m2)/100;
	  System.out.println(res0+res1+m3);
	  //System.out.println(m1);
  }
}

