Here is the code:


import java.util.Scanner;

public class Problem2 {
public static void main (String []args){
// Scanner
Scanner scan = new Scanner(System.in);