Created
October 18, 2019 10:10
-
-
Save surinoel/b868cfc06b14803502c823b9228ca6f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(void) { | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
int n; | |
cin >> n; | |
int ans = 0; | |
for (int i = 0; i < n; i++) { | |
int m; | |
cin >> m; | |
ans += (m - 1); | |
} | |
cout << ans + 1 << '\n'; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment