Problem:
Score : 100 points

Problem Statement

You are given two positive integers a and b.
Let x be the average of a and b.
Print x rounded up to the nearest integer.

Constraints

a and b are integers.

1 \leq a, b \leq 100

Input

Input is given from Standard Input in the following format:

a b

Output

Print x rounded up to the nearest integer.

Sample Input 1

1 3

Sample Output 1

2

The average of 1 and 3 is 2.0, and it will be rounded up to the nearest integer, 2.

Sample Input 2

7 4

Sample Output 2

6

The average of 7 and 4 is 5.5, and it will be rounded up to the nearest integer, 6.

Sample Input 3

5 5

Sample Output 3

5

Solution in Ruby (2.3.3) (judge verdict: Runtime Error)

require 'prime'
require 'set'
require 'tsort'
include Math
ALP = ('a'..'z').to_a
INF = 0xffffffffffffffff
def max(a,b);              a > b ? a : b                              end
def min(a,b);              a < b ?  a : b                             end
def swap(a,b);             a, b = b, a                                end
def gif;                   gets.to_i                                  end
def gff;                   gets.to_f                                  end
def gsf;                   gets.chomp                                 end
def gi;                    gets.split.map(&:to_i)                     end
def gf;                    gets.split.map(&:to_f)                     end
def gs;                    gets.chomp.split.map(&:to_s)               end
def gc;                    gets.chomp.split('')                       end
def pr(num);               num.prime_division                         end
def pr?(num);              Prime.prime?(num)                          end
def digit(num);            num.to_s.length                            end
def array(s,ini=nil);      Array.new(s){ini}                          end
def darray(s1,s2,ini=nil); Array.new(s1){Array.new(s2){ini}}          end
def rep(num);              num.times{|i|yield(i)}                     end
def repl(st,en,n=1);       st.step(en,n){|i|yield(i)}                 end

s = gc
x,y = gi
tx,ty = 0,0
dir = 0

s.each do |ss|
  case ss
  when 'F'
    case dir
    when 0
      tx += 1
    when 1
      ty += 1
    when 2
      tx -= 1
    when 3
      ty -= 1
    end
  when 'T'
    case
    when dir == 0 && y - ty > 0
      dir = 1
    when dir == 0 && y - ty < 0
      dir = 3
    when dir == 0 && y - ty == 0
      dir = 1
    when dir == 1 && x - tx > 0
      dir = 0
    when dir == 1 && x - tx < 0
      dir = 2
    when dir == 1 && x - tx == 0
      dir = 0
    when dir == 2 && y - ty > 0
      dir = 1
    when dir == 2 && y - ty < 0
      dir = 3
    when dir == 2 && y = ty == 0
      dir = 1
    when dir == 3 && x - tx > 0
      dir = 0
    when dir == 3 && x - tx < 0
      dir = 2
    when dir == 3 && x - tx == 0
      dir = 0
    end
  end
end

puts tx == x && ty == y ? 'Yes' : 'No'