#!?/usr/bin/env ruby
# -*-coding: utf-8 -*-

puts"zannkinnnyuuryoku"
zann = gets.chomp.to_i
okane = 0

while true
  puts "何円(終わる時はv)"
  gaku = gets.chomp

  if gaku =="v" || gaku =="V"
  break
end


 okane += gaku.chomp.to_i
 printf("今の小計%d円です。\n",okane)
end

zann += okane
printf("合計%d円\n",zann)
