Banks have been introducing various innovative
deposit schemes to expand their services to
customers. One of the schemes is known as the
Rainy Day Fund, where a person should invest a
be done only under the following conditions:
The amount invested in the year y1 in the first
cycle should be equal to 1.
The amount invested every year should be
exactly 1 more than that in the previous year.
Once the period of 7 years is over, the
investment cycle will start from yh again, which
means y1, y2, y3, y4, 75, 6, 77, yl, y2, y3, y4, y5,
y6, and so on. In this case, amount invested
in any year in this cycle will be 1 more than the
investment in the corresponding year in the
previous cycle.
Suppose in the first cycle of 7 years, the
investment is y1 = 31, y2 = 32, y3 = 33… y7 = 37.
In the second cycle it should he v1 = 2 7 = 33

Code In Python

num = int(input())
c = 1
x=0
t = 0
c2=1
for i in range(1,num+1):
    x=x+c2
    t=t+1
    c2=c2+1
    if(t==7):
        c=c+1
        c2=c
        t=0
    else:
        continue
print(x)