#!/bin/ruby
x=0.to_r
gets
ARGF.readlines.each do |l|
  # o,y=l.split.map(&:to_i)
  # if o==1 then
  #   x+=y
  # elsif o==2 then
  #   x-=y
  # elsif o==3 then
  #   x*=y
  # else
  #   x/=y
  # end
end
puts x.to_i