// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.math.BigDecimal;

public class BDSpeed {
    private static final int N = 500_000_000;
    public static void main(String[] args) {
        BigDecimal sum = new BigDecimal(0);
        BigDecimal v = new BigDecimal("123.500000");
        long t1 = System.currentTimeMillis();
        for(int i = 0; i < N; i++) {
            sum = sum.add(v);
        }
        long t2 = System.currentTimeMillis();
        //System.out.printf("%,d adds/sec\n", ((N * 1000L) / (t2 - t1)));
        System.out.printf("%.1f\n", (t2 - t1) / 1000.0);
    }
}
