first euler problem in java